guise 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.codeclimate.yml +36 -0
- data/.rubocop.yml +1063 -0
- data/.travis.yml +25 -5
- data/.yardopts +1 -0
- data/Appraisals +5 -0
- data/README.md +120 -29
- data/gemfiles/3.1.gemfile +1 -1
- data/gemfiles/3.1.gemfile.lock +39 -30
- data/gemfiles/3.2.gemfile +1 -1
- data/gemfiles/3.2.gemfile.lock +47 -38
- data/gemfiles/4.0.gemfile +1 -1
- data/gemfiles/4.0.gemfile.lock +47 -38
- data/gemfiles/4.1.gemfile +1 -1
- data/gemfiles/4.1.gemfile.lock +45 -38
- data/gemfiles/4.2.gemfile +1 -1
- data/gemfiles/4.2.gemfile.lock +44 -37
- data/gemfiles/5.0.gemfile +8 -0
- data/gemfiles/5.0.gemfile.lock +94 -0
- data/guise.gemspec +9 -14
- data/lib/guise.rb +29 -5
- data/lib/guise/builders.rb +129 -0
- data/lib/guise/callbacks.rb +3 -0
- data/lib/guise/errors.rb +32 -0
- data/lib/guise/introspection.rb +23 -11
- data/lib/guise/options.rb +75 -0
- data/lib/guise/registry.rb +19 -0
- data/lib/guise/scopes.rb +65 -0
- data/lib/guise/syntax.rb +158 -83
- data/lib/guise/version.rb +1 -1
- data/spec/guise_spec.rb +112 -46
- data/spec/spec_helper.rb +12 -8
- metadata +50 -29
- data/spec/factories.rb +0 -39
data/gemfiles/4.0.gemfile
CHANGED
data/gemfiles/4.0.gemfile.lock
CHANGED
@@ -8,65 +8,70 @@ PATH
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activemodel (4.0.
|
12
|
-
activesupport (= 4.0.
|
11
|
+
activemodel (4.0.13)
|
12
|
+
activesupport (= 4.0.13)
|
13
13
|
builder (~> 3.1.0)
|
14
|
-
activerecord (4.0.
|
15
|
-
activemodel (= 4.0.
|
14
|
+
activerecord (4.0.13)
|
15
|
+
activemodel (= 4.0.13)
|
16
16
|
activerecord-deprecated_finders (~> 1.0.2)
|
17
|
-
activesupport (= 4.0.
|
17
|
+
activesupport (= 4.0.13)
|
18
18
|
arel (~> 4.0.0)
|
19
|
-
activerecord-deprecated_finders (1.0.
|
20
|
-
activesupport (4.0.
|
19
|
+
activerecord-deprecated_finders (1.0.4)
|
20
|
+
activesupport (4.0.13)
|
21
21
|
i18n (~> 0.6, >= 0.6.9)
|
22
22
|
minitest (~> 4.2)
|
23
23
|
multi_json (~> 1.3)
|
24
24
|
thread_safe (~> 0.1)
|
25
25
|
tzinfo (~> 0.3.37)
|
26
|
-
appraisal (
|
26
|
+
appraisal (2.1.0)
|
27
27
|
bundler
|
28
28
|
rake
|
29
|
+
thor (>= 0.14.0)
|
29
30
|
arel (4.0.2)
|
30
31
|
builder (3.1.4)
|
31
|
-
|
32
|
+
byebug (5.0.0)
|
33
|
+
columnize (= 0.9.0)
|
34
|
+
codeclimate-test-reporter (0.4.8)
|
32
35
|
simplecov (>= 0.7.1, < 1.0.0)
|
33
36
|
coderay (1.1.0)
|
37
|
+
columnize (0.9.0)
|
34
38
|
diff-lcs (1.2.5)
|
35
39
|
docile (1.1.5)
|
36
|
-
|
37
|
-
|
38
|
-
i18n (0.6.11)
|
40
|
+
i18n (0.7.0)
|
41
|
+
json (1.8.3)
|
39
42
|
method_source (0.8.2)
|
40
43
|
minitest (4.7.5)
|
41
|
-
multi_json (1.
|
42
|
-
pry (0.10.
|
44
|
+
multi_json (1.11.2)
|
45
|
+
pry (0.10.3)
|
43
46
|
coderay (~> 1.1.0)
|
44
47
|
method_source (~> 0.8.1)
|
45
48
|
slop (~> 3.4)
|
46
|
-
rake (10.
|
47
|
-
|
48
|
-
|
49
|
-
rspec-
|
50
|
-
rspec-
|
51
|
-
|
52
|
-
|
53
|
-
|
49
|
+
rake (10.4.2)
|
50
|
+
redcarpet (3.3.3)
|
51
|
+
rspec (3.4.0)
|
52
|
+
rspec-core (~> 3.4.0)
|
53
|
+
rspec-expectations (~> 3.4.0)
|
54
|
+
rspec-mocks (~> 3.4.0)
|
55
|
+
rspec-core (3.4.0)
|
56
|
+
rspec-support (~> 3.4.0)
|
57
|
+
rspec-expectations (3.4.0)
|
54
58
|
diff-lcs (>= 1.2.0, < 2.0)
|
55
|
-
rspec-support (~> 3.
|
56
|
-
rspec-mocks (3.0
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
simplecov (0.9.0)
|
59
|
+
rspec-support (~> 3.4.0)
|
60
|
+
rspec-mocks (3.4.0)
|
61
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
62
|
+
rspec-support (~> 3.4.0)
|
63
|
+
rspec-support (3.4.0)
|
64
|
+
simplecov (0.10.0)
|
62
65
|
docile (~> 1.1.0)
|
63
|
-
|
64
|
-
simplecov-html (~> 0.
|
65
|
-
simplecov-html (0.
|
66
|
+
json (~> 1.8)
|
67
|
+
simplecov-html (~> 0.10.0)
|
68
|
+
simplecov-html (0.10.0)
|
66
69
|
slop (3.6.0)
|
67
|
-
sqlite3 (1.3.
|
68
|
-
|
69
|
-
|
70
|
+
sqlite3 (1.3.11)
|
71
|
+
thor (0.19.1)
|
72
|
+
thread_safe (0.3.5)
|
73
|
+
tzinfo (0.3.45)
|
74
|
+
yard (0.8.7.6)
|
70
75
|
|
71
76
|
PLATFORMS
|
72
77
|
ruby
|
@@ -74,12 +79,16 @@ PLATFORMS
|
|
74
79
|
DEPENDENCIES
|
75
80
|
activerecord (~> 4.0.0)
|
76
81
|
activesupport (~> 4.0.0)
|
77
|
-
appraisal (
|
82
|
+
appraisal (>= 1.0)
|
83
|
+
byebug (~> 5.0)
|
78
84
|
codeclimate-test-reporter (~> 0.3)
|
79
|
-
factory_girl (~> 4.4)
|
80
85
|
guise!
|
81
86
|
pry (~> 0.9)
|
82
87
|
rake (~> 10.1)
|
88
|
+
redcarpet (~> 3.2)
|
83
89
|
rspec (~> 3.0)
|
84
|
-
shoulda-matchers (~> 2.5)
|
85
90
|
sqlite3 (~> 1.3)
|
91
|
+
yard (~> 0.8)
|
92
|
+
|
93
|
+
BUNDLED WITH
|
94
|
+
1.10.6
|
data/gemfiles/4.1.gemfile
CHANGED
data/gemfiles/4.1.gemfile.lock
CHANGED
@@ -8,65 +8,68 @@ PATH
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activemodel (4.1.
|
12
|
-
activesupport (= 4.1.
|
11
|
+
activemodel (4.1.14)
|
12
|
+
activesupport (= 4.1.14)
|
13
13
|
builder (~> 3.1)
|
14
|
-
activerecord (4.1.
|
15
|
-
activemodel (= 4.1.
|
16
|
-
activesupport (= 4.1.
|
14
|
+
activerecord (4.1.14)
|
15
|
+
activemodel (= 4.1.14)
|
16
|
+
activesupport (= 4.1.14)
|
17
17
|
arel (~> 5.0.0)
|
18
|
-
activesupport (4.1.
|
18
|
+
activesupport (4.1.14)
|
19
19
|
i18n (~> 0.6, >= 0.6.9)
|
20
20
|
json (~> 1.7, >= 1.7.7)
|
21
21
|
minitest (~> 5.1)
|
22
22
|
thread_safe (~> 0.1)
|
23
23
|
tzinfo (~> 1.1)
|
24
|
-
appraisal (
|
24
|
+
appraisal (2.1.0)
|
25
25
|
bundler
|
26
26
|
rake
|
27
|
+
thor (>= 0.14.0)
|
27
28
|
arel (5.0.1.20140414130214)
|
28
29
|
builder (3.2.2)
|
29
|
-
|
30
|
+
byebug (5.0.0)
|
31
|
+
columnize (= 0.9.0)
|
32
|
+
codeclimate-test-reporter (0.4.8)
|
30
33
|
simplecov (>= 0.7.1, < 1.0.0)
|
31
34
|
coderay (1.1.0)
|
35
|
+
columnize (0.9.0)
|
32
36
|
diff-lcs (1.2.5)
|
33
37
|
docile (1.1.5)
|
34
|
-
|
35
|
-
|
36
|
-
i18n (0.6.11)
|
37
|
-
json (1.8.1)
|
38
|
+
i18n (0.7.0)
|
39
|
+
json (1.8.3)
|
38
40
|
method_source (0.8.2)
|
39
|
-
minitest (5.
|
40
|
-
|
41
|
-
pry (0.10.1)
|
41
|
+
minitest (5.8.2)
|
42
|
+
pry (0.10.3)
|
42
43
|
coderay (~> 1.1.0)
|
43
44
|
method_source (~> 0.8.1)
|
44
45
|
slop (~> 3.4)
|
45
|
-
rake (10.
|
46
|
-
|
47
|
-
|
48
|
-
rspec-
|
49
|
-
rspec-
|
50
|
-
|
51
|
-
|
52
|
-
|
46
|
+
rake (10.4.2)
|
47
|
+
redcarpet (3.3.3)
|
48
|
+
rspec (3.4.0)
|
49
|
+
rspec-core (~> 3.4.0)
|
50
|
+
rspec-expectations (~> 3.4.0)
|
51
|
+
rspec-mocks (~> 3.4.0)
|
52
|
+
rspec-core (3.4.0)
|
53
|
+
rspec-support (~> 3.4.0)
|
54
|
+
rspec-expectations (3.4.0)
|
53
55
|
diff-lcs (>= 1.2.0, < 2.0)
|
54
|
-
rspec-support (~> 3.
|
55
|
-
rspec-mocks (3.0
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
simplecov (0.9.0)
|
56
|
+
rspec-support (~> 3.4.0)
|
57
|
+
rspec-mocks (3.4.0)
|
58
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
59
|
+
rspec-support (~> 3.4.0)
|
60
|
+
rspec-support (3.4.0)
|
61
|
+
simplecov (0.10.0)
|
61
62
|
docile (~> 1.1.0)
|
62
|
-
|
63
|
-
simplecov-html (~> 0.
|
64
|
-
simplecov-html (0.
|
63
|
+
json (~> 1.8)
|
64
|
+
simplecov-html (~> 0.10.0)
|
65
|
+
simplecov-html (0.10.0)
|
65
66
|
slop (3.6.0)
|
66
|
-
sqlite3 (1.3.
|
67
|
-
|
67
|
+
sqlite3 (1.3.11)
|
68
|
+
thor (0.19.1)
|
69
|
+
thread_safe (0.3.5)
|
68
70
|
tzinfo (1.2.2)
|
69
71
|
thread_safe (~> 0.1)
|
72
|
+
yard (0.8.7.6)
|
70
73
|
|
71
74
|
PLATFORMS
|
72
75
|
ruby
|
@@ -74,12 +77,16 @@ PLATFORMS
|
|
74
77
|
DEPENDENCIES
|
75
78
|
activerecord (~> 4.1.0)
|
76
79
|
activesupport (~> 4.1.0)
|
77
|
-
appraisal (
|
80
|
+
appraisal (>= 1.0)
|
81
|
+
byebug (~> 5.0)
|
78
82
|
codeclimate-test-reporter (~> 0.3)
|
79
|
-
factory_girl (~> 4.4)
|
80
83
|
guise!
|
81
84
|
pry (~> 0.9)
|
82
85
|
rake (~> 10.1)
|
86
|
+
redcarpet (~> 3.2)
|
83
87
|
rspec (~> 3.0)
|
84
|
-
shoulda-matchers (~> 2.5)
|
85
88
|
sqlite3 (~> 1.3)
|
89
|
+
yard (~> 0.8)
|
90
|
+
|
91
|
+
BUNDLED WITH
|
92
|
+
1.10.6
|
data/gemfiles/4.2.gemfile
CHANGED
data/gemfiles/4.2.gemfile.lock
CHANGED
@@ -8,65 +8,68 @@ PATH
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activemodel (4.2.
|
12
|
-
activesupport (= 4.2.
|
11
|
+
activemodel (4.2.5)
|
12
|
+
activesupport (= 4.2.5)
|
13
13
|
builder (~> 3.1)
|
14
|
-
activerecord (4.2.
|
15
|
-
activemodel (= 4.2.
|
16
|
-
activesupport (= 4.2.
|
14
|
+
activerecord (4.2.5)
|
15
|
+
activemodel (= 4.2.5)
|
16
|
+
activesupport (= 4.2.5)
|
17
17
|
arel (~> 6.0)
|
18
|
-
activesupport (4.2.
|
18
|
+
activesupport (4.2.5)
|
19
19
|
i18n (~> 0.7)
|
20
20
|
json (~> 1.7, >= 1.7.7)
|
21
21
|
minitest (~> 5.1)
|
22
22
|
thread_safe (~> 0.3, >= 0.3.4)
|
23
23
|
tzinfo (~> 1.1)
|
24
|
-
appraisal (
|
24
|
+
appraisal (2.1.0)
|
25
25
|
bundler
|
26
26
|
rake
|
27
|
-
|
27
|
+
thor (>= 0.14.0)
|
28
|
+
arel (6.0.3)
|
28
29
|
builder (3.2.2)
|
29
|
-
|
30
|
+
byebug (5.0.0)
|
31
|
+
columnize (= 0.9.0)
|
32
|
+
codeclimate-test-reporter (0.4.8)
|
30
33
|
simplecov (>= 0.7.1, < 1.0.0)
|
31
34
|
coderay (1.1.0)
|
35
|
+
columnize (0.9.0)
|
32
36
|
diff-lcs (1.2.5)
|
33
37
|
docile (1.1.5)
|
34
|
-
factory_girl (4.5.0)
|
35
|
-
activesupport (>= 3.0.0)
|
36
38
|
i18n (0.7.0)
|
37
|
-
json (1.8.
|
39
|
+
json (1.8.3)
|
38
40
|
method_source (0.8.2)
|
39
|
-
minitest (5.
|
40
|
-
|
41
|
-
pry (0.10.1)
|
41
|
+
minitest (5.8.2)
|
42
|
+
pry (0.10.3)
|
42
43
|
coderay (~> 1.1.0)
|
43
44
|
method_source (~> 0.8.1)
|
44
45
|
slop (~> 3.4)
|
45
46
|
rake (10.4.2)
|
46
|
-
|
47
|
-
|
48
|
-
rspec-
|
49
|
-
rspec-
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
redcarpet (3.3.3)
|
48
|
+
rspec (3.4.0)
|
49
|
+
rspec-core (~> 3.4.0)
|
50
|
+
rspec-expectations (~> 3.4.0)
|
51
|
+
rspec-mocks (~> 3.4.0)
|
52
|
+
rspec-core (3.4.0)
|
53
|
+
rspec-support (~> 3.4.0)
|
54
|
+
rspec-expectations (3.4.0)
|
53
55
|
diff-lcs (>= 1.2.0, < 2.0)
|
54
|
-
rspec-support (~> 3.
|
55
|
-
rspec-mocks (3.
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
simplecov (0.9.1)
|
56
|
+
rspec-support (~> 3.4.0)
|
57
|
+
rspec-mocks (3.4.0)
|
58
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
59
|
+
rspec-support (~> 3.4.0)
|
60
|
+
rspec-support (3.4.0)
|
61
|
+
simplecov (0.10.0)
|
61
62
|
docile (~> 1.1.0)
|
62
|
-
|
63
|
-
simplecov-html (~> 0.
|
64
|
-
simplecov-html (0.
|
63
|
+
json (~> 1.8)
|
64
|
+
simplecov-html (~> 0.10.0)
|
65
|
+
simplecov-html (0.10.0)
|
65
66
|
slop (3.6.0)
|
66
|
-
sqlite3 (1.3.
|
67
|
-
|
67
|
+
sqlite3 (1.3.11)
|
68
|
+
thor (0.19.1)
|
69
|
+
thread_safe (0.3.5)
|
68
70
|
tzinfo (1.2.2)
|
69
71
|
thread_safe (~> 0.1)
|
72
|
+
yard (0.8.7.6)
|
70
73
|
|
71
74
|
PLATFORMS
|
72
75
|
ruby
|
@@ -74,12 +77,16 @@ PLATFORMS
|
|
74
77
|
DEPENDENCIES
|
75
78
|
activerecord (~> 4.2.0)
|
76
79
|
activesupport (~> 4.2.0)
|
77
|
-
appraisal (
|
80
|
+
appraisal (>= 1.0)
|
81
|
+
byebug (~> 5.0)
|
78
82
|
codeclimate-test-reporter (~> 0.3)
|
79
|
-
factory_girl (~> 4.4)
|
80
83
|
guise!
|
81
84
|
pry (~> 0.9)
|
82
85
|
rake (~> 10.1)
|
86
|
+
redcarpet (~> 3.2)
|
83
87
|
rspec (~> 3.0)
|
84
|
-
shoulda-matchers (~> 2.5)
|
85
88
|
sqlite3 (~> 1.3)
|
89
|
+
yard (~> 0.8)
|
90
|
+
|
91
|
+
BUNDLED WITH
|
92
|
+
1.10.6
|
@@ -0,0 +1,94 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../
|
3
|
+
specs:
|
4
|
+
guise (0.6.0)
|
5
|
+
activerecord (>= 3.1, < 5.0)
|
6
|
+
activesupport (>= 3.1, < 5.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
activemodel (5.0.0.beta1)
|
12
|
+
activesupport (= 5.0.0.beta1)
|
13
|
+
builder (~> 3.1)
|
14
|
+
activerecord (5.0.0.beta1)
|
15
|
+
activemodel (= 5.0.0.beta1)
|
16
|
+
activesupport (= 5.0.0.beta1)
|
17
|
+
arel (~> 7.0)
|
18
|
+
activesupport (5.0.0.beta1)
|
19
|
+
concurrent-ruby (~> 1.0)
|
20
|
+
i18n (~> 0.7)
|
21
|
+
json (~> 1.7, >= 1.7.7)
|
22
|
+
method_source
|
23
|
+
minitest (~> 5.1)
|
24
|
+
tzinfo (~> 1.1)
|
25
|
+
appraisal (2.1.0)
|
26
|
+
bundler
|
27
|
+
rake
|
28
|
+
thor (>= 0.14.0)
|
29
|
+
arel (7.0.0)
|
30
|
+
builder (3.2.2)
|
31
|
+
byebug (5.0.0)
|
32
|
+
columnize (= 0.9.0)
|
33
|
+
codeclimate-test-reporter (0.4.8)
|
34
|
+
simplecov (>= 0.7.1, < 1.0.0)
|
35
|
+
coderay (1.1.0)
|
36
|
+
columnize (0.9.0)
|
37
|
+
concurrent-ruby (1.0.0)
|
38
|
+
diff-lcs (1.2.5)
|
39
|
+
docile (1.1.5)
|
40
|
+
i18n (0.7.0)
|
41
|
+
json (1.8.3)
|
42
|
+
method_source (0.8.2)
|
43
|
+
minitest (5.8.3)
|
44
|
+
pry (0.10.3)
|
45
|
+
coderay (~> 1.1.0)
|
46
|
+
method_source (~> 0.8.1)
|
47
|
+
slop (~> 3.4)
|
48
|
+
rake (10.5.0)
|
49
|
+
redcarpet (3.3.4)
|
50
|
+
rspec (3.4.0)
|
51
|
+
rspec-core (~> 3.4.0)
|
52
|
+
rspec-expectations (~> 3.4.0)
|
53
|
+
rspec-mocks (~> 3.4.0)
|
54
|
+
rspec-core (3.4.1)
|
55
|
+
rspec-support (~> 3.4.0)
|
56
|
+
rspec-expectations (3.4.0)
|
57
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
58
|
+
rspec-support (~> 3.4.0)
|
59
|
+
rspec-mocks (3.4.1)
|
60
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
61
|
+
rspec-support (~> 3.4.0)
|
62
|
+
rspec-support (3.4.1)
|
63
|
+
simplecov (0.11.1)
|
64
|
+
docile (~> 1.1.0)
|
65
|
+
json (~> 1.8)
|
66
|
+
simplecov-html (~> 0.10.0)
|
67
|
+
simplecov-html (0.10.0)
|
68
|
+
slop (3.6.0)
|
69
|
+
sqlite3 (1.3.11)
|
70
|
+
thor (0.19.1)
|
71
|
+
thread_safe (0.3.5)
|
72
|
+
tzinfo (1.2.2)
|
73
|
+
thread_safe (~> 0.1)
|
74
|
+
yard (0.8.7.6)
|
75
|
+
|
76
|
+
PLATFORMS
|
77
|
+
ruby
|
78
|
+
|
79
|
+
DEPENDENCIES
|
80
|
+
activerecord (~> 5.0.0.beta)
|
81
|
+
activesupport (~> 5.0.0.beta)
|
82
|
+
appraisal (>= 1.0)
|
83
|
+
byebug (~> 5.0)
|
84
|
+
codeclimate-test-reporter (~> 0.3)
|
85
|
+
guise!
|
86
|
+
pry (~> 0.9)
|
87
|
+
rake (~> 10.1)
|
88
|
+
redcarpet (~> 3.2)
|
89
|
+
rspec (~> 3.0)
|
90
|
+
sqlite3 (~> 1.3)
|
91
|
+
yard (~> 0.8)
|
92
|
+
|
93
|
+
BUNDLED WITH
|
94
|
+
1.10.6
|