racym 0.0.4 → 0.0.5

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,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b40cb08e4716eb170a6801bb5eb746bf80b7ba14
4
- data.tar.gz: ed86af699dc22fbc64d7fbe942995afd2f9d02b8
2
+ SHA256:
3
+ metadata.gz: 7526accebf5f139e4e76a413da4d63242ad5e3ce1bb1d4f4ecf8e019164e1cd4
4
+ data.tar.gz: 9bc5ebdb2a093650107486e5740b148bd1076d45f661301d17bcc43af074f250
5
5
  SHA512:
6
- metadata.gz: 015d78a2cdbb6ee4b41b1b1cac7c0a63355314ee0195286eb121cd89c67413eadedc1ed6b428e5639d3e52ea7e2fe096f5385a610d1291b140d8011b4096633b
7
- data.tar.gz: 5f0d8b7f6909cd14222921512a6b3b7ae5e4bfe08868573ff6ad5f2eaf5d89c80965e33a0400f49c72f1eb0bd05a233f001e37f4fccb695d2aacddb3a8737068
6
+ metadata.gz: c4357233a9edbcc9252e441eff57ba2fdd6ed1d3200de84ef86e2a1a4a4b87dcd1eb9b6186d94bb15f3c4b2f4660741bafc4f5c9b7e1f68956a692bacb234d6a
7
+ data.tar.gz: 15afa8c87a711383a93dfc57e535a5051a0989f0fad5590262331f4363a506f87829fe9057953feb8d47b516b558174791a16ee6de2fb16b1bef03457e825501
data/.gitignore CHANGED
@@ -7,7 +7,6 @@ Gemfile.lock
7
7
  InstalledFiles
8
8
  _yardoc
9
9
  coverage
10
- doc/
11
10
  lib/bundler/man
12
11
  pkg
13
12
  rdoc
@@ -1 +1 @@
1
- 2.4.2
1
+ 2.6.3
@@ -1,6 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.2
4
- - 1.9.3
5
- - jruby-19mode
6
- - 2.0.0
3
+ - 2.0
4
+ - 2.1
5
+ - 2.2
6
+ - 2.3
7
+ - 2.4
8
+ - 2.5
9
+ - 2.6
@@ -0,0 +1,6 @@
1
+ # 0.0.5
2
+
3
+ - Add Rails 6 Support (https://github.com/usertesting/racym/pull/5)
4
+ - [DOC] Fill out README
5
+ - Set up CodeClimate / coveralls
6
+ - Add tests
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in racym.gemspec
4
4
  gemspec
5
+
6
+ gem "coveralls", require: false
@@ -1,22 +1,17 @@
1
- Copyright (c) 2016 UserTesting.com
1
+ The MIT License (MIT)
2
+ Copyright (c) 2019 User Testing, Inc.
2
3
 
3
- MIT License
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5
+ and associated documentation files (the "Software"), to deal in the Software without restriction,
6
+ including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
7
+ and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
8
+ subject to the following conditions:
4
9
 
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
10
+ The above copyright notice and this permission notice shall be included in all copies or substantial
11
+ portions of the Software.
12
12
 
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
14
+ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
15
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
16
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
17
+ OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,35 +1,122 @@
1
- [![Build Status](https://travis-ci.org/usertesting/racym.png)](https://travis-ci.org/usertesting/racym)
1
+ # racym
2
2
 
3
- [![Code Climate](https://codeclimate.com/github/usertesting/racym.png)](https://codeclimate.com/github/usertesting/racym)
4
-
5
- # Racym
3
+ [![Travis](https://img.shields.io/travis/usertesting/racym?style=for-the-badge)](https://travis-ci.org/usertesting/racym) [![Coveralls github](https://img.shields.io/coveralls/github/usertesting/racym?style=for-the-badge)](https://coveralls.io/github/usertesting/racym) [![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/usertesting/racym?style=for-the-badge)](https://codeclimate.com/github/usertesting/racym)
6
4
 
7
5
  Rails Application Configuration for Yield Main (RACYM)
8
6
 
9
- Racym is used as a shortcut to rails configuration.
7
+ racym is used as a shortcut to rails configuration.
10
8
 
11
9
  ## Installation
12
10
 
13
11
  Add this line to your application's Gemfile:
14
12
 
15
- gem 'racym'
13
+ ```ruby
14
+ gem "racym"
15
+ ```
16
16
 
17
17
  And then execute:
18
18
 
19
- $ bundle
19
+ ```ruby
20
+ $ bundle install
21
+ ```
22
+
23
+ ## Usage
20
24
 
21
- Or install it yourself as:
25
+ ### Setting config values
22
26
 
23
- $ gem install racym
27
+ In your `config/application.rb` add config settings:
24
28
 
25
- ## Usage
29
+ ```ruby
30
+ module MyApp
31
+ class Application < Rails::Application
32
+
33
+ ...
34
+
35
+ # Add a custom config setting here:
36
+ config.foo = "bar"
37
+
38
+ # Or a proc:
39
+ config.biz = -> { DateTime.current }
40
+ ```
41
+
42
+ ### Getting config values
43
+
44
+ From anywhere in your Rails application (controllers/helpers/views - should be available anywhere!)
45
+
46
+ ```ruby
47
+ puts racym(:foo)
48
+ # => "bar"
49
+
50
+ puts racym(:biz)
51
+ # => Wed, 02 Oct 2019 11:13:20 -0700
52
+
53
+ # ten minutes later:
54
+ puts racym(:biz)
55
+ # => Wed, 02 Oct 2019 11:23:20 -0700
56
+ ```
57
+
58
+ ### Multilevel key/values
59
+
60
+ #### Setting:
61
+
62
+ ```ruby
63
+ module MyApp
64
+ class Application < Rails::Application
65
+
66
+ ...
67
+
68
+ config.foo.username = "BAR"
69
+ config.foo.password = "BIZ"
70
+ ```
71
+
72
+ #### Getting:
73
+
74
+ ```ruby
75
+ puts racym(:foo, :username)
76
+ # => "BAR"
77
+
78
+ puts racym(:foo, :password)
79
+ # => "BIZ"
80
+ ```
81
+
82
+ ### Testing
83
+
84
+ There's some convenient methods you can use to test code using racym:
85
+ - `racym_set`
86
+ - `racym_undo!`
87
+
88
+ For example, to test this simple method:
89
+
90
+ ```ruby
91
+ class Foo
92
+ def self.hi
93
+ "Hi #{racym :person_to_hi}"
94
+ end
95
+ end
96
+ ```
97
+
98
+ ```ruby
99
+ describe Foo do
100
+ describe ".hi" do
101
+ before { racym_set :person_to_hi, "Dave" }
102
+ specify { expect(Foo.hi).to eq "Hi Dave" }
103
+ after { racym_undo! }
104
+ end
105
+ end
106
+ ```
107
+
108
+ ## License
109
+
110
+ [MIT](LICENSE).
111
+
112
+ Library created by [UserTesting](https://usertesting.com)
26
113
 
27
- TODO: Write usage instructions here
114
+ ![UserTesting](doc/UserTesting.png)
28
115
 
29
116
  ## Contributing
30
117
 
31
- 1. Fork it
118
+ 1. Fork it ( https://github.com/usertesting/racym/fork )
32
119
  2. Create your feature branch (`git checkout -b my-new-feature`)
33
120
  3. Commit your changes (`git commit -am 'Add some feature'`)
34
121
  4. Push to the branch (`git push origin my-new-feature`)
35
- 5. Create new Pull Request
122
+ 5. Create a new Pull Request
@@ -1,3 +1,3 @@
1
1
  module Racym
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -13,14 +13,14 @@ Gem::Specification.new do |spec|
13
13
  spec.homepage = ""
14
14
  spec.license = "MIT"
15
15
 
16
- spec.files = `git ls-files`.split($/)
16
+ spec.files = `git ls-files`.split($/).reject { |f| f.match(%r{^(spec|doc)/}) }
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "railties", ">= 3.2.13","< 6.0"
22
-
23
- spec.add_development_dependency "bundler", "~> 1.3"
21
+ spec.add_dependency "railties", ">= 3.2.13","< 7.0"
22
+
23
+ spec.add_development_dependency "bundler"
24
24
  spec.add_development_dependency "rake"
25
25
  spec.add_development_dependency "rspec"
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: racym
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Raffauf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-18 00:00:00.000000000 Z
11
+ date: 2019-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 3.2.13
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '6.0'
22
+ version: '7.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,21 +29,21 @@ dependencies:
29
29
  version: 3.2.13
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '6.0'
32
+ version: '7.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: bundler
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - "~>"
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '1.3'
39
+ version: '0'
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - "~>"
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: '1.3'
46
+ version: '0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -82,6 +82,7 @@ files:
82
82
  - ".gitignore"
83
83
  - ".ruby-version"
84
84
  - ".travis.yml"
85
+ - CHANGELOG.markdown
85
86
  - Gemfile
86
87
  - LICENSE.txt
87
88
  - README.md
@@ -89,7 +90,6 @@ files:
89
90
  - lib/racym.rb
90
91
  - lib/racym/version.rb
91
92
  - racym.gemspec
92
- - spec/lib/racym_spec.rb
93
93
  homepage: ''
94
94
  licenses:
95
95
  - MIT
@@ -109,11 +109,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
- rubyforge_project:
113
- rubygems_version: 2.4.8
112
+ rubygems_version: 3.0.3
114
113
  signing_key:
115
114
  specification_version: 4
116
115
  summary: Used as a shortcut to rails configuration.
117
- test_files:
118
- - spec/lib/racym_spec.rb
119
- has_rdoc:
116
+ test_files: []
@@ -1,5 +0,0 @@
1
- require_relative '../../lib/racym'
2
-
3
- describe "racym" do
4
- pending
5
- end