strudel 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjE1YjU5NGQwMGM2ZDVhN2Y4NzRjNWUxODJlYWM1NDdlNmIxNGM1Yg==
4
+ ZGIyYzZmMzM0OWZlNjQxYjYzMTMyMjU2YWE0NGY3Y2ViMTE2N2U1Nw==
5
5
  data.tar.gz: !binary |-
6
- MjViNzIwNjY2ZmEzMWI3ZGIxMTEyZDFkZDJlYTdmYTVhYjI3YzZlYQ==
6
+ MTM5YjQ4YjRjNTExYWQwYjlhZDFiMzNmYzU4OWQ0OGExMmZiZTRlYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODI4ZjFmMDVhMzQwNTc1NjE0OGM2ZTMwMjE0NGIxNjE5NmVjZmUwNzk2MGUz
10
- YzljMzVhMjA5NmI1NDA2M2M2YzdhZmFkNTAyMjA2MTdmMTI0ZmE0YTFkYzcx
11
- YzY0ZGY4OTU2NTY1YTFkZWQ2OGJiMmViOTE4Y2JhNTAxYjdiNDM=
9
+ ODFiMTZlOGE3M2MyNmYxZmQ0ZTVmYWQ5YTdhZTM4MmZiOTlkYmQ4YmVjNGQw
10
+ MGZiY2MxZTBjYzc2MmZlZTEwMGMyNzJjNDA4YTBlMWVkMWUzY2JhYTQ1NjMx
11
+ ZGYwYzM4MDRmOGY3OTdjNzE5MjVmM2JiNTk1ZjZhMGNiNDIxZTU=
12
12
  data.tar.gz: !binary |-
13
- MTZiNjhlYTY0ZmMyZGFhNGU1NjQ4Mjc5YzgyYzM4YWJlNTI2OTVkM2M2ZmUz
14
- N2MwY2Y5NWEyOTEyNmRmMjIwNWUwNDFjMjFiZjFmNWNhZTU3YTdlYmQzYjMy
15
- MjlmYWI2MTZmZTE5M2QzZDQxMzgyNDU2YTc5MDFlYTEzYjQ5Y2I=
13
+ OTQzMTQ4MGEwZTg4MjM2NjY3NzMwZjA4NGViZTAzOWFjZWMyZmI3OWYzMjQ2
14
+ NjNlM2E4M2FmNWFjZDgxNGU3YmEyYWI4N2E1Mjk1Mjc0ZWZjMGI5MmVmMzRm
15
+ N2Y4MmIyODYzYmE4MzcyMzdmOWE3MWU2ZDI3YzdhYjViOTFjZWU=
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
- --format documentation
2
1
  --color
2
+ --require spec_helper
data/.rubocop.yml CHANGED
@@ -1,6 +1,8 @@
1
- AllCops:
2
- Exclude:
3
- - 'bin/*'
4
- - 'vendor/**/*'
1
+ Style/AlignParameters:
2
+ EnforcedStyle: with_fixed_indentation
3
+
5
4
  Style/Documentation:
6
5
  Enabled: false
6
+
7
+ Style/MultilineMethodCallIndentation:
8
+ EnforcedStyle: indented
data/.yardopts ADDED
@@ -0,0 +1,4 @@
1
+ --markup markdown
2
+ lib/**/*.rb
3
+ -
4
+ LICENSE.txt
data/README.md CHANGED
@@ -94,11 +94,11 @@ available methods:
94
94
 
95
95
  ## API Documentation
96
96
 
97
- API documentation can be found [inline][inline-docs], or you can generate HTML documentation
98
- with yard.
97
+ API documentation can be found at [rubydoc.info][docs], or you can generate HTML
98
+ documentation with yard.
99
99
 
100
100
  ```sh
101
- bin/rake yard
101
+ bin/yard
102
102
  ```
103
103
 
104
104
  ## Credits
@@ -121,4 +121,4 @@ License][mit].
121
121
  [pimple]: http://pimple.sensiolabs.org
122
122
  [fabien]: https://github.com/fabpot
123
123
  [mit]: http://opensource.org/licenses/MIT
124
- [inline-docs]: lib/strudel.rb
124
+ [docs]: http://www.rubydoc.info/github/justinhoward/strudel
data/bin/rake CHANGED
@@ -6,11 +6,11 @@
6
6
  # this file is here to facilitate running it.
7
7
  #
8
8
 
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
11
11
  Pathname.new(__FILE__).realpath)
12
12
 
13
- require "rubygems"
14
- require "bundler/setup"
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
15
 
16
- load Gem.bin_path("rake", "rake")
16
+ load Gem.bin_path('rake', 'rake')
data/bin/rspec CHANGED
@@ -6,11 +6,11 @@
6
6
  # this file is here to facilitate running it.
7
7
  #
8
8
 
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
11
11
  Pathname.new(__FILE__).realpath)
12
12
 
13
- require "rubygems"
14
- require "bundler/setup"
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
15
 
16
- load Gem.bin_path("rspec-core", "rspec")
16
+ load Gem.bin_path('rspec-core', 'rspec')
data/bin/rubocop ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'rubocop' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require 'pathname'
11
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require 'rubygems'
15
+ require 'bundler/setup'
16
+
17
+ load Gem.bin_path('rubocop', 'rubocop')
data/bin/yard CHANGED
@@ -6,11 +6,11 @@
6
6
  # this file is here to facilitate running it.
7
7
  #
8
8
 
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
11
11
  Pathname.new(__FILE__).realpath)
12
12
 
13
- require "rubygems"
14
- require "bundler/setup"
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
15
 
16
- load Gem.bin_path("yard", "yard")
16
+ load Gem.bin_path('yard', 'yard')
data/bin/yardoc CHANGED
@@ -6,11 +6,11 @@
6
6
  # this file is here to facilitate running it.
7
7
  #
8
8
 
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
11
11
  Pathname.new(__FILE__).realpath)
12
12
 
13
- require "rubygems"
14
- require "bundler/setup"
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
15
 
16
- load Gem.bin_path("yard", "yardoc")
16
+ load Gem.bin_path('yard', 'yardoc')
data/bin/yri CHANGED
@@ -6,11 +6,11 @@
6
6
  # this file is here to facilitate running it.
7
7
  #
8
8
 
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
11
11
  Pathname.new(__FILE__).realpath)
12
12
 
13
- require "rubygems"
14
- require "bundler/setup"
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
15
 
16
- load Gem.bin_path("yard", "yri")
16
+ load Gem.bin_path('yard', 'yri')
data/lib/strudel.rb CHANGED
@@ -14,7 +14,7 @@ class Strudel
14
14
 
15
15
  # Get a service by key
16
16
  #
17
- # If the service is not set, returns +nil+.
17
+ # If the service is not set, returns `nil`.
18
18
  #
19
19
  # @param [key] key The service key
20
20
  # @return [value, nil] The service or nil if not set
@@ -31,13 +31,13 @@ class Strudel
31
31
 
32
32
  # Set a service by key and value
33
33
  #
34
- # If +service+ is a Proc, its return value will be treated as a
34
+ # If `service` is a Proc, its return value will be treated as a
35
35
  # singleton service meaning it will be initialized the first time it is
36
36
  # requested and its valud will be cached for subsequent requests.
37
37
  #
38
- # Use the +set+ method to allow using a block instead of a Proc argument.
38
+ # Use the `set` method to allow using a block instead of a Proc argument.
39
39
  #
40
- # If +service+ is not a function, its value will be stored directly.
40
+ # If `service` is not a function, its value will be stored directly.
41
41
  #
42
42
  # @param [key] key The service key
43
43
  # @param [Proc, value] service The service singleton Proc or static service
@@ -48,7 +48,7 @@ class Strudel
48
48
 
49
49
  # Set a service by key and value
50
50
  #
51
- # Same as +[]=+ except allows passing a block instead of a Proc argument.
51
+ # Same as `[]=` except allows passing a block instead of a Proc argument.
52
52
  #
53
53
  # @param [key] key The service key
54
54
  # @param [Proc, value, nil] service The service singleton Proc or static
@@ -61,11 +61,11 @@ class Strudel
61
61
 
62
62
  # Set a factory service by key and value
63
63
  #
64
- # If +factory+ is a function, it will be called every time the service is
64
+ # If `factory` is a function, it will be called every time the service is
65
65
  # requested. So if it returns an object, it will create a new object for
66
66
  # every request.
67
67
  #
68
- # If +factory+ is not a function, this method acts like +set+.
68
+ # If `factory` is not a function, this method acts like `set`.
69
69
  #
70
70
  # @param [key] key The service key
71
71
  # @param [Proc, block] factory The service factory Proc or static service
@@ -77,11 +77,11 @@ class Strudel
77
77
 
78
78
  # Set a protected service by name and value
79
79
  #
80
- # If +service+ is a function, the function itself will be registered as a
81
- # service. So when it is requested with +get+, the function will be returned
80
+ # If `service` is a function, the function itself will be registered as a
81
+ # service. So when it is requested with `get`, the function will be returned
82
82
  # instead of the function's return value.
83
83
  #
84
- # If +service+ is not a function, this method acts like +set+.
84
+ # If `service` is not a function, this method acts like `set`.
85
85
  #
86
86
  # @param [key] key The service key
87
87
  # @param [Proc, value, nil] service The service function.
@@ -93,22 +93,22 @@ class Strudel
93
93
 
94
94
  # Extends an existing service and overrides it.
95
95
  #
96
- # The +extender+ block will be called with 2 arguments: +old_value+ and
97
- # +self+. If there is no existing +key+ service, +old_value+ will be nil. It
96
+ # The `extender` block will be called with 2 arguments: `old_value` and
97
+ # `self`. If there is no existing `key` service, `old_value` will be nil. It
98
98
  # should return the new value for the service that will override the existing
99
99
  # one.
100
100
  #
101
- # If +extend+ is called for a service that was created with +set+, the
101
+ # If `extend` is called for a service that was created with `set`, the
102
102
  # resulting service will be a singleton.
103
103
  #
104
- # If +extend+ is called for a service that was created with +factory+, the
104
+ # If `extend` is called for a service that was created with `factory`, the
105
105
  # resulting service will be a factory.
106
106
  #
107
- # If +extend+ is called for a service that was created with +protect+, the
107
+ # If `extend` is called for a service that was created with `protect`, the
108
108
  # resulting service will also be protected.
109
109
  #
110
- # If +extender+ is not a function, this method will override any existing
111
- # service like +set+.
110
+ # If `extender` is not a function, this method will override any existing
111
+ # service like `set`.
112
112
  #
113
113
  # @param [key] key The service key
114
114
  # @param [Proc, value, nil] extender
@@ -128,7 +128,7 @@ class Strudel
128
128
  # Iterates over the service keys
129
129
  #
130
130
  # If a block is given, the block is called with each of the service keys
131
- # If a block is not given, returns an +Enumerable+ of the keys.
131
+ # If a block is not given, returns an `Enumerable` of the keys.
132
132
  #
133
133
  # The key order is undefined.
134
134
  #
@@ -139,7 +139,7 @@ class Strudel
139
139
  @services.each_key { |key| yield key }
140
140
  end
141
141
 
142
- # Checks if a service for +key+ exists.
142
+ # Checks if a service for `key` exists.
143
143
  #
144
144
  # @return [bool] True if the service exists.
145
145
  def include?(key)
data/strudel.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'strudel'
7
- spec.version = '0.1.0'
7
+ spec.version = '0.1.1'
8
8
  spec.authors = ['Justin Howard']
9
9
  spec.email = ['jmhoward0@gmail.com']
10
10
 
@@ -18,8 +18,8 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ['lib']
19
19
 
20
20
  spec.add_development_dependency 'rake', '~> 10.0'
21
- spec.add_development_dependency 'rspec'
22
- spec.add_development_dependency 'yard'
21
+ spec.add_development_dependency 'rspec', '~> 3.4'
22
+ spec.add_development_dependency 'yard', '~> 0.8'
23
23
  spec.add_development_dependency 'simplecov'
24
24
  spec.add_development_dependency 'rubocop'
25
25
  spec.add_development_dependency 'codeclimate-test-reporter'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strudel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Howard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-24 00:00:00.000000000 Z
11
+ date: 2016-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -28,30 +28,30 @@ dependencies:
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '3.4'
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
- version: '0'
40
+ version: '3.4'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: yard
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '0.8'
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
- version: '0'
54
+ version: '0.8'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: simplecov
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -105,12 +105,14 @@ files:
105
105
  - .rspec
106
106
  - .rubocop.yml
107
107
  - .travis.yml
108
+ - .yardopts
108
109
  - Gemfile
109
110
  - LICENSE.txt
110
111
  - README.md
111
112
  - Rakefile
112
113
  - bin/rake
113
114
  - bin/rspec
115
+ - bin/rubocop
114
116
  - bin/yard
115
117
  - bin/yardoc
116
118
  - bin/yri