gemer 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: af77ab460f575fa24ec773b948ed7ec3738b6d8a29b23dd603b6203c342c269b
4
- data.tar.gz: 861de47a101e41f670afe8ac4a0c534d448a5cb94e07a9c2d427af2ef5429cda
3
+ metadata.gz: a524016eb3edaffbd382faf69354ecd10e21c06f16efccf35ca0296b8f5fbdd3
4
+ data.tar.gz: 60a9aedd6b40f2107eca85282538839f969dc27d13a6d28408ce1dd9cb3a8601
5
5
  SHA512:
6
- metadata.gz: 91219ee2a6441c3323bab2bc74cc9471a1be303dade35c1d8644807ff17a420f201eb058858afd1448d58bff9536bf4c09c9422fc5f880fee8bde6d2aa72cbe9
7
- data.tar.gz: 0ddbf2697ce8a2e38fd24a6b07dcdb365f01560bf5f66a6030ac1b5cf94ef44307df462defd0c5fca331af697a1789595b31a7422fb8b905887052ace0866dd9
6
+ metadata.gz: f2b9666ebf32cdf34c9d20748325a400b8fc3ac9f39605a3998c3bb3bc2938859cf87dd0c363d0a5b8ae5cf1610471e2316b95e950c3b01329a6414e7c3460e8
7
+ data.tar.gz: 6c6b1d348bed006f465a772168ff3e978ac9bdbee1392e964c613cb1713c6eb1877f89a5be2ed21e9168df99e59e282e2e5f6d7024ac449d3d4653a19ed0786b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- Gemer (0.1.0)
4
+ gemer (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -31,8 +31,8 @@ PLATFORMS
31
31
  ruby
32
32
 
33
33
  DEPENDENCIES
34
- Gemer!
35
34
  bundler (~> 1.16)
35
+ gemer!
36
36
  pry
37
37
  rake (~> 10.0)
38
38
  rspec (~> 3.0)
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Gemly
1
+ # Gemer
2
2
 
3
3
  A lightweight gem designed to provide tools for Ruby modules and gems
4
4
 
@@ -7,7 +7,7 @@ A lightweight gem designed to provide tools for Ruby modules and gems
7
7
  Add this line to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'gemly'
10
+ gem 'gemer'
11
11
  ```
12
12
 
13
13
  And then execute:
@@ -16,17 +16,17 @@ And then execute:
16
16
 
17
17
  Or install it yourself as:
18
18
 
19
- $ gem install gemly
19
+ $ gem install gemer
20
20
 
21
21
  ## Usage
22
22
 
23
23
  ### Configuration
24
24
 
25
- Any module can be made configurable with Gemly with simple module extension:
25
+ Any module can be made configurable with gemer with simple module extension:
26
26
 
27
27
  ```ruby
28
28
  module MyModule
29
- include Gemly::Configurable
29
+ include Gemer::Configurable
30
30
 
31
31
  # Default configuration values
32
32
  configure_defaults do |c|
@@ -61,7 +61,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
61
61
 
62
62
  ## Contributing
63
63
 
64
- Bug reports and pull requests are welcome on GitHub at https://github.com/thebadmonkeydev/gemly. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
64
+ Bug reports and pull requests are welcome on GitHub at https://github.com/thebadmonkeydev/gemer. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
65
65
 
66
66
  ## License
67
67
 
@@ -69,4 +69,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
69
69
 
70
70
  ## Code of Conduct
71
71
 
72
- Everyone interacting in the Gemly project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/thebadmonkeydev/gemly/blob/master/CODE_OF_CONDUCT.md).
72
+ Everyone interacting in the gemer project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/thebadmonkeydev/gemer/blob/master/CODE_OF_CONDUCT.md).
@@ -4,15 +4,4 @@ require 'gemer/configurator'
4
4
  require 'pry'
5
5
 
6
6
  module Gemer
7
- include Gemer::Configurable
8
-
9
- setup_config do |c|
10
- c.attr :cache
11
- c.attr :expiry, 5400
12
- c.attr :force, false, in: [true, false]
13
- c.attr :logger
14
- c.attr :prefix
15
-
16
- c.read_only :namespace, 'GraphQL::Cache'
17
- end
18
7
  end
@@ -43,12 +43,23 @@ module Gemer
43
43
  @target.class_eval <<-DEF, __FILE__, __LINE__ + 1
44
44
  class << self
45
45
  def #{name}
46
- @#{name} ||= #{value.nil? ? 'nil' : value}
46
+ @#{name} ||= #{interpolated_value(value)}
47
47
  end
48
48
  end
49
49
  DEF
50
50
  end
51
51
 
52
+ def interpolated_value(value)
53
+ case value.class.name
54
+ when 'NilClass'
55
+ 'nil'
56
+ when 'String'
57
+ "'#{value}'"
58
+ else
59
+ value
60
+ end
61
+ end
62
+
52
63
  def define_reader(name)
53
64
  @target.class_eval <<-DEF, __FILE__, __LINE__ + 1
54
65
  class << self
@@ -1,3 +1,3 @@
1
1
  module Gemer
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemer
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
  - Michael Kelly