Skip to content

Commit 3dc16e2

Browse files
committed
All is working the example
0 parents  commit 3dc16e2

21 files changed

+88887
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/build
2+
/node_modules

.rubocop.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
AllCops:
2+
TargetRubyVersion: 2.4
3+
4+
5+
# Layout
6+
7+
Layout/AlignHash:
8+
EnforcedHashRocketStyle: table
9+
EnforcedColonStyle: table
10+
11+
# Multi-line method chaining should be done with trailing dots.
12+
Layout/DotPosition:
13+
EnforcedStyle: leading
14+
SupportedStyles:
15+
- leading
16+
- trailing
17+
18+
19+
# Metrics
20+
21+
Metrics/AbcSize:
22+
# The ABC size is a calculated magnitude, so this number can be a Fixnum or
23+
# a Float.
24+
Max: 20
25+
26+
Metrics/BlockLength:
27+
Description: 'Avoid long blocks with many lines.'
28+
Enabled: false
29+
30+
Metrics/ClassLength:
31+
Max: 200
32+
33+
Metrics/LineLength:
34+
Max: 100
35+
36+
37+
# Style
38+
39+
Style/BlockDelimiters:
40+
EnforcedStyle: line_count_based
41+
SupportedStyles:
42+
# The `line_count_based` style enforces braces around single line blocks and
43+
# do..end around multi-line blocks.
44+
- line_count_based
45+
# The `semantic` style enforces braces around functional blocks, where the
46+
# primary purpose of the block is to return a value and do..end for
47+
# procedural blocks, where the primary purpose of the block is its
48+
# side-effects.
49+
#
50+
# This looks at the usage of a block's method to determine its type (e.g. is
51+
# the result of a `map` assigned to a variable or passed to another
52+
# method) but exceptions are permitted in the `ProceduralMethods`,
53+
# `FunctionalMethods` and `IgnoredMethods` sections below.
54+
- semantic
55+
# The `braces_for_chaining` style enforces braces around single line blocks
56+
# and do..end around multi-line blocks, except for multi-line blocks whose
57+
# return value is being chained with another method (in which case braces
58+
# are enforced).
59+
- braces_for_chaining
60+
ProceduralMethods:
61+
# Methods that are known to be procedural in nature but look functional from
62+
# their usage, e.g.
63+
#
64+
# time = Benchmark.realtime do
65+
# foo.bar
66+
# end
67+
#
68+
# Here, the return value of the block is discarded but the return value of
69+
# `Benchmark.realtime` is used.
70+
- benchmark
71+
- bm
72+
- bmbm
73+
- create
74+
- each_with_object
75+
- measure
76+
- new
77+
- realtime
78+
- tap
79+
- with_object
80+
FunctionalMethods:
81+
# Methods that are known to be functional in nature but look procedural from
82+
# their usage, e.g.
83+
#
84+
# let(:foo) { Foo.new }
85+
#
86+
# Here, the return value of `Foo.new` is used to define a `foo` helper but
87+
# doesn't appear to be used from the return value of `let`.
88+
- let
89+
- let!
90+
- subject
91+
- watch
92+
IgnoredMethods:
93+
# Methods that can be either procedural or functional and cannot be
94+
# categorised from their usage alone, e.g.
95+
#
96+
# foo = lambda do |x|
97+
# puts "Hello, #{x}"
98+
# end
99+
#
100+
# foo = lambda do |x|
101+
# x * 100
102+
# end
103+
#
104+
# Here, it is impossible to tell from the return value of `lambda` whether
105+
# the inner block's return value is significant.
106+
- lambda
107+
- proc
108+
- it
109+
110+
Style/Documentation:
111+
Description: 'Document classes and non-namespace modules.'
112+
Enabled: false
113+
Exclude:
114+
- 'spec/**/*'
115+
- 'test/**/*'
116+
117+
Style/DoubleNegation:
118+
Description: 'Avoid the use of double negation (`!!`).'
119+
Enabled: false
120+
121+
Style/MultilineBlockChain:
122+
Description: 'Avoid multi-line chains of blocks.'
123+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
124+
Enabled: false

Gemfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# frozen_string_literal: true
2+
3+
source 'https://rubygems.org'
4+
5+
# TODO: change branch back to edge once the changes are merged
6+
git 'https://github.com/hyperstack-org/hyperstack', branch: 'hyperstack-js', glob: 'ruby/*/*.gemspec' do
7+
gem 'rails-hyperstack'
8+
end
9+
10+
# gem 'hyper-operation', path: '../hyperstack/ruby/hyper-operation'
11+
12+
gem 'opal'
13+
gem 'opal-activesupport'
14+
gem 'opal-browser'
15+
gem 'opal-jquery'
16+
17+
gem 'rake'
18+
gem 'uglifier'

0 commit comments

Comments
 (0)