docile 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +3 -1
- data/HISTORY.md +6 -0
- data/README.md +8 -3
- data/docile.gemspec +2 -7
- data/lib/docile/version.rb +1 -1
- data/spec/docile_spec.rb +6 -6
- data/spec/spec_helper.rb +27 -18
- metadata +27 -26
- data/.coveralls.yml +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10cb56eaa668d186cedb1bab3bdda31a84ef4f13
|
4
|
+
data.tar.gz: 19a69dac94f84a2976212184093cc3a26df2c05c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af34a724f7dc51c9d539c4bdca6e0bb711ead40b9487434eb3dc6b8a06444dea5e258262dc6d4032e5ea3c2fe66c0b58e594f350b5a7ecd2bad7fc947c904904
|
7
|
+
data.tar.gz: 1df5d786c840df1e52b6809a6e884d0a916662278a1dd7a625e41508e15c92990c920b6c99a30af82dd233b20b880504f5f2707e201019ee9a809598b75a0369
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/HISTORY.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# HISTORY
|
2
2
|
|
3
|
+
## [v1.1.4 (Jun 11, 2014)](http://github.com/ms-ati/docile/compare/v1.1.3...v1.1.4)
|
4
|
+
|
5
|
+
- Special thanks to Ken Dreyer (@ktdreyer):
|
6
|
+
- make simplecov/coveralls optional for running tests \[[33834852c7](https://github.com/ms-ati/docile/commit/33834852c7849912b97e109e8c5c193579cc5e98)\]
|
7
|
+
- update URL in gemspec \[[174e654a07](https://github.com/ms-ati/docile/commit/174e654a075c8350b3411b212cfb409bc605348a)\]
|
8
|
+
|
3
9
|
## [v1.1.3 (Feb 4, 2014)](http://github.com/ms-ati/docile/compare/v1.1.2...v1.1.3)
|
4
10
|
|
5
11
|
- Special thanks to Alexey Vasiliev (@le0pard):
|
data/README.md
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
[![Dependency Status](https://gemnasium.com/ms-ati/docile.png)](https://gemnasium.com/ms-ati/docile)
|
5
5
|
[![Code Climate](https://codeclimate.com/github/ms-ati/docile.png)](https://codeclimate.com/github/ms-ati/docile)
|
6
6
|
[![Coverage Status](https://coveralls.io/repos/ms-ati/docile/badge.png)](https://coveralls.io/r/ms-ati/docile)
|
7
|
+
[![Inline docs](http://inch-ci.org/github/ms-ati/docile.png)](http://inch-ci.org/github/ms-ati/docile)
|
7
8
|
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/ms-ati/docile/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
|
8
9
|
|
9
10
|
Ruby makes it possible to create very expressive **Domain Specific
|
@@ -214,7 +215,9 @@ $ gem install docile
|
|
214
215
|
|
215
216
|
## Status
|
216
217
|
|
217
|
-
Works on [all ruby versions since 1.8.7](https://github.com/ms-ati/docile/blob/master/.travis.yml).
|
218
|
+
Works on [all ruby versions since 1.8.7](https://github.com/ms-ati/docile/blob/master/.travis.yml), or so Travis CI [tells us](https://travis-ci.org/ms-ati/docile).
|
219
|
+
|
220
|
+
Used by some pretty cool gems to implement their DSLs, notably including [SimpleCov](https://github.com/colszowka/simplecov). Keep an eye out for new gems using Docile at the [Ruby Toolbox](https://www.ruby-toolbox.com/projects/docile).
|
218
221
|
|
219
222
|
## Note on Patches/Pull Requests
|
220
223
|
|
@@ -229,8 +232,10 @@ Works on [all ruby versions since 1.8.7](https://github.com/ms-ati/docile/blob/m
|
|
229
232
|
commit by itself I can ignore when I pull)
|
230
233
|
* Send me a pull request. Bonus points for topic branches.
|
231
234
|
|
232
|
-
## Copyright
|
235
|
+
## Copyright & License
|
236
|
+
|
237
|
+
Copyright (c) 2012-2014 Marc Siegel.
|
233
238
|
|
234
|
-
|
239
|
+
Licensed under the [MIT License](http://choosealicense.com/licenses/mit/), see [LICENSE](LICENSE) for details.
|
235
240
|
|
236
241
|
|
data/docile.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.version = Docile::VERSION
|
7
7
|
s.authors = ['Marc Siegel']
|
8
8
|
s.email = %w(msiegel@usainnov.com)
|
9
|
-
s.homepage = '
|
9
|
+
s.homepage = 'https://ms-ati.github.io/docile/'
|
10
10
|
s.summary = 'Docile keeps your Ruby DSLs tame and well-behaved'
|
11
11
|
s.description = 'Docile turns any Ruby object into a DSL. Especially useful with the Builder pattern.'
|
12
12
|
s.license = 'MIT'
|
@@ -19,15 +19,10 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.require_paths = %w(lib)
|
20
20
|
|
21
21
|
# Running rspec tests from rake
|
22
|
-
s.add_development_dependency 'rake', '
|
22
|
+
s.add_development_dependency 'rake', '>= 10.1.1'
|
23
23
|
s.add_development_dependency 'rspec', '~> 2.14.0'
|
24
24
|
s.add_development_dependency 'mime-types', '~> 1.25.1'
|
25
25
|
|
26
|
-
if defined?(RUBY_ENGINE) && 'rbx' == RUBY_ENGINE
|
27
|
-
s.add_development_dependency 'rubysl'
|
28
|
-
s.add_development_dependency 'rubinius-coverage'
|
29
|
-
end
|
30
|
-
|
31
26
|
if !(defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
32
27
|
# Github flavored markdown in YARD documentation
|
33
28
|
# http://blog.nikosd.com/2011/11/github-flavored-markdown-in-yard.html
|
data/lib/docile/version.rb
CHANGED
data/spec/docile_spec.rb
CHANGED
@@ -18,11 +18,11 @@ describe Docile do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
it 'executes the block against the DSL context object' do
|
21
|
-
|
21
|
+
expect(array).to eq([1, 3])
|
22
22
|
end
|
23
23
|
|
24
24
|
it 'returns the DSL object after executing block against it' do
|
25
|
-
|
25
|
+
expect(result).to eq(array)
|
26
26
|
end
|
27
27
|
|
28
28
|
it "doesn't proxy #__id__" do
|
@@ -276,11 +276,11 @@ describe Docile do
|
|
276
276
|
end
|
277
277
|
|
278
278
|
it "doesn't modify the original string" do
|
279
|
-
|
279
|
+
expect(original).to eq("I'm immutable!")
|
280
280
|
end
|
281
281
|
|
282
282
|
it 'chains the commands in the block against the DSL context object' do
|
283
|
-
|
283
|
+
expect(result).to eq("!ELBATUMMI M'I")
|
284
284
|
end
|
285
285
|
end
|
286
286
|
|
@@ -296,7 +296,7 @@ describe Docile do
|
|
296
296
|
end
|
297
297
|
|
298
298
|
it 'chains the commands in the block against the DSL context object' do
|
299
|
-
|
299
|
+
expect(result).to eq(42)
|
300
300
|
end
|
301
301
|
end
|
302
302
|
end
|
@@ -305,7 +305,7 @@ end
|
|
305
305
|
|
306
306
|
describe Docile::FallbackContextProxy do
|
307
307
|
|
308
|
-
describe
|
308
|
+
describe '#instance_variables' do
|
309
309
|
subject { create_fcp_and_set_one_instance_variable.instance_variables }
|
310
310
|
let(:expected_type_of_names) { type_of_ivar_names_on_this_ruby }
|
311
311
|
let(:actual_type_of_names) { subject.first.class }
|
data/spec/spec_helper.rb
CHANGED
@@ -1,28 +1,37 @@
|
|
1
|
-
|
2
|
-
require '
|
3
|
-
require '
|
4
|
-
require 'simplecov'
|
5
|
-
require 'coveralls'
|
1
|
+
begin
|
2
|
+
require 'simplecov'
|
3
|
+
require 'coveralls'
|
6
4
|
|
7
|
-
#
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
5
|
+
# On Ruby 1.9+ use SimpleCov and publish to Coveralls.io
|
6
|
+
if !RUBY_VERSION.start_with? '1.8'
|
7
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
8
|
+
SimpleCov::Formatter::HTMLFormatter,
|
9
|
+
Coveralls::SimpleCov::Formatter
|
10
|
+
]
|
11
|
+
SimpleCov.start do
|
12
|
+
add_filter '/spec/' # exclude test code
|
13
|
+
add_filter '/vendor/' # exclude gems which are vendored on Travis CI
|
14
|
+
end
|
15
15
|
|
16
|
-
|
17
|
-
|
16
|
+
# Remove Docile, which was required by SimpleCov, to require again later
|
17
|
+
Object.send(:remove_const, :Docile)
|
18
|
+
$LOADED_FEATURES.reject! { |f| f =~ /\/docile\// }
|
19
|
+
end
|
20
|
+
rescue LoadError
|
21
|
+
warn 'warning: simplecov/coveralls gems not found; skipping coverage'
|
22
|
+
end
|
18
23
|
|
19
|
-
lib_dir = File.join(File.dirname(
|
20
|
-
$LOAD_PATH.unshift lib_dir unless $LOAD_PATH.include?
|
24
|
+
lib_dir = File.join(File.dirname(File.dirname(__FILE__)), 'lib')
|
25
|
+
$LOAD_PATH.unshift lib_dir unless $LOAD_PATH.include? lib_dir
|
21
26
|
|
27
|
+
# Require Docile again, now with coverage enabled on 1.9+
|
22
28
|
require 'docile'
|
23
29
|
|
30
|
+
require 'singleton'
|
31
|
+
require 'rspec'
|
32
|
+
|
24
33
|
RSpec.configure do |config|
|
25
34
|
config.expect_with :rspec do |c|
|
26
35
|
c.syntax = :expect
|
27
36
|
end
|
28
|
-
end
|
37
|
+
end
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc Siegel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 10.1.1
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 10.1.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 2.14.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 2.14.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: mime-types
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 1.25.1
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.25.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: yard
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
@@ -84,28 +84,28 @@ dependencies:
|
|
84
84
|
name: github-markup
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: coveralls
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
description: Docile turns any Ruby object into a DSL. Especially useful with the Builder
|
@@ -116,13 +116,12 @@ executables: []
|
|
116
116
|
extensions: []
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
|
-
- .
|
120
|
-
- .
|
121
|
-
- .
|
122
|
-
- .ruby-
|
123
|
-
- .
|
124
|
-
- .
|
125
|
-
- .yardopts
|
119
|
+
- ".gitignore"
|
120
|
+
- ".rspec"
|
121
|
+
- ".ruby-gemset"
|
122
|
+
- ".ruby-version"
|
123
|
+
- ".travis.yml"
|
124
|
+
- ".yardopts"
|
126
125
|
- Gemfile
|
127
126
|
- HISTORY.md
|
128
127
|
- LICENSE
|
@@ -136,7 +135,7 @@ files:
|
|
136
135
|
- lib/docile/version.rb
|
137
136
|
- spec/docile_spec.rb
|
138
137
|
- spec/spec_helper.rb
|
139
|
-
homepage:
|
138
|
+
homepage: https://ms-ati.github.io/docile/
|
140
139
|
licenses:
|
141
140
|
- MIT
|
142
141
|
metadata: {}
|
@@ -146,19 +145,21 @@ require_paths:
|
|
146
145
|
- lib
|
147
146
|
required_ruby_version: !ruby/object:Gem::Requirement
|
148
147
|
requirements:
|
149
|
-
- -
|
148
|
+
- - ">="
|
150
149
|
- !ruby/object:Gem::Version
|
151
150
|
version: '0'
|
152
151
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
152
|
requirements:
|
154
|
-
- -
|
153
|
+
- - ">="
|
155
154
|
- !ruby/object:Gem::Version
|
156
155
|
version: '0'
|
157
156
|
requirements: []
|
158
157
|
rubyforge_project: docile
|
159
|
-
rubygems_version: 2.
|
158
|
+
rubygems_version: 2.2.0
|
160
159
|
signing_key:
|
161
160
|
specification_version: 4
|
162
161
|
summary: Docile keeps your Ruby DSLs tame and well-behaved
|
163
|
-
test_files:
|
162
|
+
test_files:
|
163
|
+
- spec/docile_spec.rb
|
164
|
+
- spec/spec_helper.rb
|
164
165
|
has_rdoc:
|
data/.coveralls.yml
DELETED