dockly-util 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa82faeaa551aae9dd5cbcfcb31c502117ac3286
4
- data.tar.gz: db2b3bfadcce12546935ab8f23bd4874d57b78c4
3
+ metadata.gz: 2f3aaa2bfb70f3eed0acf0781ee7afdd56633f69
4
+ data.tar.gz: 3d4ca0e3db096d71cdeec51dd76180bba182eeae
5
5
  SHA512:
6
- metadata.gz: 655560e869545e587da06ceef918f6a171e7fd13089c215eada9ca08be7f05a3c63c153c76ce659707bb95c9152b0cd773047c6b2b6d5d4c5db3bf9954251a4c
7
- data.tar.gz: faa5b3e270132eaa44847c4a08b29a39692b8191fbef2b9a60168727adeff8908888781dba33c65d0922a759c00cfb591a23b9e3a9c6bfab0ec4aebfc74a923c
6
+ metadata.gz: 3bdcd353a00377d93443587a671f063fd6f4b98d7a74e398aba00d46c8a93e8e2469345019b4f85b027271d81f1e692581f9693a93b2c20a3ce70a91a1e41b35
7
+ data.tar.gz: a97b9c097901c013ffc3e63ae44de8cede859185229c0f60b13d9df78c2f7aa09f9cc6973267ccca049d508ea3435d869051f4b71120f557cd77e4dd30a0c065
data/dockly-util.gemspec CHANGED
@@ -18,4 +18,5 @@ Gem::Specification.new do |gem|
18
18
  gem.add_development_dependency 'rspec'
19
19
  gem.add_development_dependency 'cane'
20
20
  gem.add_development_dependency 'pry'
21
+ gem.add_development_dependency 'rspec-its'
21
22
  end
@@ -76,7 +76,7 @@ module Dockly::Util::DSL
76
76
 
77
77
  def default_values
78
78
  @default_values ||= if self.superclass.respond_to?(:default_values)
79
- self.superclass.default_values
79
+ Marshal.load(Marshal.dump(self.superclass.default_values))
80
80
  else
81
81
  {}
82
82
  end
@@ -1,5 +1,5 @@
1
1
  module Dockly
2
2
  module Util
3
- VERSION = '0.0.8'
3
+ VERSION = '0.0.9'
4
4
  end
5
5
  end
@@ -49,6 +49,7 @@ describe Dockly::Util::DSL do
49
49
  .to 'bbq'
50
50
  end
51
51
  end
52
+
52
53
  end
53
54
  end
54
55
 
@@ -198,6 +199,29 @@ describe Dockly::Util::DSL do
198
199
  test_class.default_values[:chips].should == 'Cool Ranch'
199
200
  end
200
201
  end
202
+
203
+ context 'when extending' do
204
+ class Parent
205
+ include Dockly::Util::DSL
206
+
207
+ dsl_attribute :test
208
+ default_value :test, 'not so fancy'
209
+ end
210
+
211
+ class Child < Parent
212
+ dsl_attribute :fancy_test
213
+ default_value :fancy_test, 'fancy'
214
+ end
215
+
216
+ it "should have all default values in child" do
217
+ expect( Child.default_values).to match_array(
218
+ [[:fancy_test, 'fancy'], [:test, 'not so fancy']] )
219
+ end
220
+
221
+ it "should not include child default values in parent" do
222
+ expect( Parent.default_values).to_not include(:fancy_test)
223
+ end
224
+ end
201
225
  end
202
226
 
203
227
  describe '#initialize' do
@@ -6,7 +6,7 @@ describe Dockly::Util::Logger do
6
6
 
7
7
  describe '#initialize' do
8
8
  its(:prefix) { should be_empty }
9
- its(:print_method?) { should be_true }
9
+ its(:print_method?) { should be_truthy }
10
10
  its(:output) { should == STDOUT }
11
11
  end
12
12
 
data/spec/spec_helper.rb CHANGED
@@ -2,6 +2,7 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
  $LOAD_PATH.unshift(File.dirname(__FILE__))
3
3
 
4
4
  require 'rspec'
5
+ require 'rspec/its'
5
6
  require 'pry'
6
7
  require 'dockly/util'
7
8
 
metadata CHANGED
@@ -1,69 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dockly-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swipely, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-04 00:00:00.000000000 Z
11
+ date: 2014-08-14 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: '0'
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: '0'
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: '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: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: cane
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
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: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pry
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
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec-its
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
67
81
  - !ruby/object:Gem::Version
68
82
  version: '0'
69
83
  description: DSL made easy
@@ -75,10 +89,10 @@ executables: []
75
89
  extensions: []
76
90
  extra_rdoc_files: []
77
91
  files:
78
- - ".cane"
79
- - ".gitignore"
80
- - ".rspec"
81
- - ".travis.yml"
92
+ - .cane
93
+ - .gitignore
94
+ - .rspec
95
+ - .travis.yml
82
96
  - Gemfile
83
97
  - LICENSE.txt
84
98
  - Rakefile
@@ -101,17 +115,17 @@ require_paths:
101
115
  - lib
102
116
  required_ruby_version: !ruby/object:Gem::Requirement
103
117
  requirements:
104
- - - ">="
118
+ - - '>='
105
119
  - !ruby/object:Gem::Version
106
120
  version: '0'
107
121
  required_rubygems_version: !ruby/object:Gem::Requirement
108
122
  requirements:
109
- - - ">="
123
+ - - '>='
110
124
  - !ruby/object:Gem::Version
111
125
  version: '0'
112
126
  requirements: []
113
127
  rubyforge_project:
114
- rubygems_version: 2.2.0
128
+ rubygems_version: 2.0.14
115
129
  signing_key:
116
130
  specification_version: 4
117
131
  summary: DSL made easy
@@ -119,3 +133,4 @@ test_files:
119
133
  - spec/dockly/util/dsl_spec.rb
120
134
  - spec/dockly/util/logger_spec.rb
121
135
  - spec/spec_helper.rb
136
+ has_rdoc: