knowledge-rails 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +53 -0
- data/.gitignore +14 -0
- data/.rspec +3 -0
- data/.rubocop.yml +19 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +178 -0
- data/README.md +39 -0
- data/Rakefile +8 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/knowledge-rails.gemspec +47 -0
- data/lib/knowledge/rails.rb +9 -0
- data/lib/knowledge/rails/version.rb +7 -0
- data/lib/knowledge/setters/rails.rb +34 -0
- metadata +162 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 64f6255564601847b5d2abb1ab71c4faa56b3b02371abcb1435865e8f78aa501
|
4
|
+
data.tar.gz: 48f221296eef1a253a8a0a18b088f0010d04ff1dbbf2a02c6bd71971a5f98ca3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: aca4e74c6f3d10f73dae59dd006f4d11c841d8b54b8172f539c04e1a26185156a3a083fc4e2ef56c9a91b0b0daee5f65ec569aca0b488858e718216906494ea0
|
7
|
+
data.tar.gz: 29c9ef71d1478fc40859d25ed4ebdb2c6224615e5fe5a162e571951a7d8c244e9441171f432a7f55b5be9c8c01ee6063e53a329ac1c9c6beeaf16c42d46f5975
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# Ruby CircleCI 2.0 configuration file
|
2
|
+
#
|
3
|
+
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
4
|
+
#
|
5
|
+
version: 2
|
6
|
+
jobs:
|
7
|
+
build:
|
8
|
+
docker:
|
9
|
+
- image: circleci/ruby:2.5
|
10
|
+
|
11
|
+
working_directory: ~/repo
|
12
|
+
|
13
|
+
steps:
|
14
|
+
- checkout
|
15
|
+
|
16
|
+
# Download and cache dependencies
|
17
|
+
- restore_cache:
|
18
|
+
keys:
|
19
|
+
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
20
|
+
# fallback to using the latest cache if no exact match is found
|
21
|
+
- v1-dependencies-
|
22
|
+
|
23
|
+
- run:
|
24
|
+
name: install dependencies
|
25
|
+
command: |
|
26
|
+
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
27
|
+
|
28
|
+
- save_cache:
|
29
|
+
paths:
|
30
|
+
- ./vendor/bundle
|
31
|
+
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
32
|
+
|
33
|
+
- run:
|
34
|
+
name: RSpec specs
|
35
|
+
command: |
|
36
|
+
mkdir /tmp/test-results
|
37
|
+
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
|
38
|
+
|
39
|
+
bundle exec rspec --format progress \
|
40
|
+
--out /tmp/test-results/rspec.xml \
|
41
|
+
--format progress \
|
42
|
+
$TEST_FILES
|
43
|
+
|
44
|
+
# collect reports
|
45
|
+
- store_test_results:
|
46
|
+
path: /tmp/test-results
|
47
|
+
- store_artifacts:
|
48
|
+
path: /tmp/test-results
|
49
|
+
destination: test-results
|
50
|
+
|
51
|
+
- run:
|
52
|
+
name: Rubocop linting
|
53
|
+
command: bundle exec rubocop
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.5
|
3
|
+
Exclude:
|
4
|
+
- lib/knowledge/rails/version.rb
|
5
|
+
- vendor/bundle/*
|
6
|
+
|
7
|
+
Metrics/LineLength:
|
8
|
+
Max: 120
|
9
|
+
|
10
|
+
Metrics/MethodLength:
|
11
|
+
Max: 50
|
12
|
+
|
13
|
+
Metrics/ClassLength:
|
14
|
+
Max: 200
|
15
|
+
|
16
|
+
Metrics/BlockLength:
|
17
|
+
Exclude:
|
18
|
+
- knowledge-rails.gemspec
|
19
|
+
- spec/**/*.rb
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at johann.open-source@protonmail.ch. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,178 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../knowledge
|
3
|
+
specs:
|
4
|
+
knowledge (0.1.2)
|
5
|
+
dry-configurable (~> 0.7)
|
6
|
+
|
7
|
+
PATH
|
8
|
+
remote: .
|
9
|
+
specs:
|
10
|
+
knowledge-rails (0.1.0)
|
11
|
+
knowledge
|
12
|
+
rails
|
13
|
+
|
14
|
+
GEM
|
15
|
+
remote: https://rubygems.org/
|
16
|
+
specs:
|
17
|
+
actioncable (5.2.2)
|
18
|
+
actionpack (= 5.2.2)
|
19
|
+
nio4r (~> 2.0)
|
20
|
+
websocket-driver (>= 0.6.1)
|
21
|
+
actionmailer (5.2.2)
|
22
|
+
actionpack (= 5.2.2)
|
23
|
+
actionview (= 5.2.2)
|
24
|
+
activejob (= 5.2.2)
|
25
|
+
mail (~> 2.5, >= 2.5.4)
|
26
|
+
rails-dom-testing (~> 2.0)
|
27
|
+
actionpack (5.2.2)
|
28
|
+
actionview (= 5.2.2)
|
29
|
+
activesupport (= 5.2.2)
|
30
|
+
rack (~> 2.0)
|
31
|
+
rack-test (>= 0.6.3)
|
32
|
+
rails-dom-testing (~> 2.0)
|
33
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
34
|
+
actionview (5.2.2)
|
35
|
+
activesupport (= 5.2.2)
|
36
|
+
builder (~> 3.1)
|
37
|
+
erubi (~> 1.4)
|
38
|
+
rails-dom-testing (~> 2.0)
|
39
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
40
|
+
activejob (5.2.2)
|
41
|
+
activesupport (= 5.2.2)
|
42
|
+
globalid (>= 0.3.6)
|
43
|
+
activemodel (5.2.2)
|
44
|
+
activesupport (= 5.2.2)
|
45
|
+
activerecord (5.2.2)
|
46
|
+
activemodel (= 5.2.2)
|
47
|
+
activesupport (= 5.2.2)
|
48
|
+
arel (>= 9.0)
|
49
|
+
activestorage (5.2.2)
|
50
|
+
actionpack (= 5.2.2)
|
51
|
+
activerecord (= 5.2.2)
|
52
|
+
marcel (~> 0.3.1)
|
53
|
+
activesupport (5.2.2)
|
54
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
55
|
+
i18n (>= 0.7, < 2)
|
56
|
+
minitest (~> 5.1)
|
57
|
+
tzinfo (~> 1.1)
|
58
|
+
arel (9.0.0)
|
59
|
+
ast (2.4.0)
|
60
|
+
builder (3.2.3)
|
61
|
+
concurrent-ruby (1.1.4)
|
62
|
+
crass (1.0.4)
|
63
|
+
diff-lcs (1.3)
|
64
|
+
docile (1.3.1)
|
65
|
+
dry-configurable (0.7.0)
|
66
|
+
concurrent-ruby (~> 1.0)
|
67
|
+
erubi (1.8.0)
|
68
|
+
globalid (0.4.1)
|
69
|
+
activesupport (>= 4.2.0)
|
70
|
+
i18n (1.3.0)
|
71
|
+
concurrent-ruby (~> 1.0)
|
72
|
+
jaro_winkler (1.5.1)
|
73
|
+
json (2.1.0)
|
74
|
+
loofah (2.2.3)
|
75
|
+
crass (~> 1.0.2)
|
76
|
+
nokogiri (>= 1.5.9)
|
77
|
+
mail (2.7.1)
|
78
|
+
mini_mime (>= 0.1.1)
|
79
|
+
marcel (0.3.3)
|
80
|
+
mimemagic (~> 0.3.2)
|
81
|
+
method_source (0.9.2)
|
82
|
+
mimemagic (0.3.3)
|
83
|
+
mini_mime (1.0.1)
|
84
|
+
mini_portile2 (2.4.0)
|
85
|
+
minitest (5.11.3)
|
86
|
+
nio4r (2.3.1)
|
87
|
+
nokogiri (1.9.1)
|
88
|
+
mini_portile2 (~> 2.4.0)
|
89
|
+
parallel (1.12.1)
|
90
|
+
parser (2.5.3.0)
|
91
|
+
ast (~> 2.4.0)
|
92
|
+
powerpack (0.1.2)
|
93
|
+
rack (2.0.6)
|
94
|
+
rack-test (1.1.0)
|
95
|
+
rack (>= 1.0, < 3)
|
96
|
+
rails (5.2.2)
|
97
|
+
actioncable (= 5.2.2)
|
98
|
+
actionmailer (= 5.2.2)
|
99
|
+
actionpack (= 5.2.2)
|
100
|
+
actionview (= 5.2.2)
|
101
|
+
activejob (= 5.2.2)
|
102
|
+
activemodel (= 5.2.2)
|
103
|
+
activerecord (= 5.2.2)
|
104
|
+
activestorage (= 5.2.2)
|
105
|
+
activesupport (= 5.2.2)
|
106
|
+
bundler (>= 1.3.0)
|
107
|
+
railties (= 5.2.2)
|
108
|
+
sprockets-rails (>= 2.0.0)
|
109
|
+
rails-dom-testing (2.0.3)
|
110
|
+
activesupport (>= 4.2.0)
|
111
|
+
nokogiri (>= 1.6)
|
112
|
+
rails-html-sanitizer (1.0.4)
|
113
|
+
loofah (~> 2.2, >= 2.2.2)
|
114
|
+
railties (5.2.2)
|
115
|
+
actionpack (= 5.2.2)
|
116
|
+
activesupport (= 5.2.2)
|
117
|
+
method_source
|
118
|
+
rake (>= 0.8.7)
|
119
|
+
thor (>= 0.19.0, < 2.0)
|
120
|
+
rainbow (3.0.0)
|
121
|
+
rake (10.5.0)
|
122
|
+
rspec (3.8.0)
|
123
|
+
rspec-core (~> 3.8.0)
|
124
|
+
rspec-expectations (~> 3.8.0)
|
125
|
+
rspec-mocks (~> 3.8.0)
|
126
|
+
rspec-core (3.8.0)
|
127
|
+
rspec-support (~> 3.8.0)
|
128
|
+
rspec-expectations (3.8.2)
|
129
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
130
|
+
rspec-support (~> 3.8.0)
|
131
|
+
rspec-mocks (3.8.0)
|
132
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
133
|
+
rspec-support (~> 3.8.0)
|
134
|
+
rspec-support (3.8.0)
|
135
|
+
rubocop (0.61.1)
|
136
|
+
jaro_winkler (~> 1.5.1)
|
137
|
+
parallel (~> 1.10)
|
138
|
+
parser (>= 2.5, != 2.5.1.1)
|
139
|
+
powerpack (~> 0.1)
|
140
|
+
rainbow (>= 2.2.2, < 4.0)
|
141
|
+
ruby-progressbar (~> 1.7)
|
142
|
+
unicode-display_width (~> 1.4.0)
|
143
|
+
ruby-progressbar (1.10.0)
|
144
|
+
simplecov (0.16.1)
|
145
|
+
docile (~> 1.1)
|
146
|
+
json (>= 1.8, < 3)
|
147
|
+
simplecov-html (~> 0.10.0)
|
148
|
+
simplecov-html (0.10.2)
|
149
|
+
sprockets (3.7.2)
|
150
|
+
concurrent-ruby (~> 1.0)
|
151
|
+
rack (> 1, < 3)
|
152
|
+
sprockets-rails (3.2.1)
|
153
|
+
actionpack (>= 4.0)
|
154
|
+
activesupport (>= 4.0)
|
155
|
+
sprockets (>= 3.0.0)
|
156
|
+
thor (0.20.3)
|
157
|
+
thread_safe (0.3.6)
|
158
|
+
tzinfo (1.2.5)
|
159
|
+
thread_safe (~> 0.1)
|
160
|
+
unicode-display_width (1.4.1)
|
161
|
+
websocket-driver (0.7.0)
|
162
|
+
websocket-extensions (>= 0.1.0)
|
163
|
+
websocket-extensions (0.1.3)
|
164
|
+
|
165
|
+
PLATFORMS
|
166
|
+
ruby
|
167
|
+
|
168
|
+
DEPENDENCIES
|
169
|
+
bundler (~> 1.17)
|
170
|
+
knowledge!
|
171
|
+
knowledge-rails!
|
172
|
+
rake (~> 10.0)
|
173
|
+
rspec (~> 3.0)
|
174
|
+
rubocop
|
175
|
+
simplecov
|
176
|
+
|
177
|
+
BUNDLED WITH
|
178
|
+
1.17.2
|
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# Knowledge::Rails
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/knowledge/rails`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'knowledge-rails'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install knowledge-rails
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/knowledge-rails. 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.
|
36
|
+
|
37
|
+
## Code of Conduct
|
38
|
+
|
39
|
+
Everyone interacting in the Knowledge::Rails project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/knowledge-rails/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'knowledge/rails'
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require 'irb'
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'knowledge/rails/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'knowledge-rails'
|
9
|
+
spec.version = Knowledge::Rails::VERSION
|
10
|
+
spec.authors = ['Johann Wilfrid-Calixte']
|
11
|
+
spec.email = ['johann.open-source@protonmail.ch']
|
12
|
+
|
13
|
+
spec.summary = 'Knowledge x Rails'
|
14
|
+
spec.description = 'Rails utilities to use knowledge'
|
15
|
+
spec.homepage = 'https://github.com/knowledge-ruby/knowledge-rails'
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
21
|
+
|
22
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
23
|
+
spec.metadata['source_code_uri'] = 'https://github.com/knowledge-ruby/knowledge-rails'
|
24
|
+
spec.metadata['changelog_uri'] = 'https://github.com/knowledge-ruby/knowledge-rails/blob/master/CHANGELOG.md'
|
25
|
+
else
|
26
|
+
raise 'RubyGems 2.0 or newer is required to protect against ' \
|
27
|
+
'public gem pushes.'
|
28
|
+
end
|
29
|
+
|
30
|
+
# Specify which files should be added to the gem when it is released.
|
31
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
32
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
33
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
34
|
+
end
|
35
|
+
spec.bindir = 'exe'
|
36
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
37
|
+
spec.require_paths = ['lib']
|
38
|
+
|
39
|
+
spec.add_dependency 'knowledge', '>= 0.1.3'
|
40
|
+
spec.add_dependency 'rails'
|
41
|
+
|
42
|
+
spec.add_development_dependency 'bundler', '~> 1.17'
|
43
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
44
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
45
|
+
spec.add_development_dependency 'rubocop'
|
46
|
+
spec.add_development_dependency 'simplecov'
|
47
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Knowledge
|
4
|
+
module Setters
|
5
|
+
#
|
6
|
+
# === Description
|
7
|
+
#
|
8
|
+
# Using rails app configuration.
|
9
|
+
#
|
10
|
+
# === Usage
|
11
|
+
#
|
12
|
+
# @example:
|
13
|
+
#
|
14
|
+
# Knowledge::Setters::Rails.new.set(name: :foo, value: 'bar')
|
15
|
+
#
|
16
|
+
class Rails < Base
|
17
|
+
# == Instance methods ============================================================================================
|
18
|
+
|
19
|
+
#
|
20
|
+
# Sets the variable in rails app.
|
21
|
+
#
|
22
|
+
# === Parameters
|
23
|
+
#
|
24
|
+
# @param :name [String | Symbol]
|
25
|
+
# @param :value [Any]
|
26
|
+
#
|
27
|
+
def set(name:, value:)
|
28
|
+
::Rails.application.config.public_send("#{name}=", value)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
Knowledge::Setters.config.default = Knowledge::Setters::Rails
|
metadata
ADDED
@@ -0,0 +1,162 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: knowledge-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Johann Wilfrid-Calixte
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-12-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: knowledge
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.3
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.1.3
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rails
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.17'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.17'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: Rails utilities to use knowledge
|
112
|
+
email:
|
113
|
+
- johann.open-source@protonmail.ch
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- ".circleci/config.yml"
|
119
|
+
- ".gitignore"
|
120
|
+
- ".rspec"
|
121
|
+
- ".rubocop.yml"
|
122
|
+
- ".ruby-gemset"
|
123
|
+
- ".ruby-version"
|
124
|
+
- ".travis.yml"
|
125
|
+
- CODE_OF_CONDUCT.md
|
126
|
+
- Gemfile
|
127
|
+
- Gemfile.lock
|
128
|
+
- README.md
|
129
|
+
- Rakefile
|
130
|
+
- bin/console
|
131
|
+
- bin/setup
|
132
|
+
- knowledge-rails.gemspec
|
133
|
+
- lib/knowledge/rails.rb
|
134
|
+
- lib/knowledge/rails/version.rb
|
135
|
+
- lib/knowledge/setters/rails.rb
|
136
|
+
homepage: https://github.com/knowledge-ruby/knowledge-rails
|
137
|
+
licenses: []
|
138
|
+
metadata:
|
139
|
+
homepage_uri: https://github.com/knowledge-ruby/knowledge-rails
|
140
|
+
source_code_uri: https://github.com/knowledge-ruby/knowledge-rails
|
141
|
+
changelog_uri: https://github.com/knowledge-ruby/knowledge-rails/blob/master/CHANGELOG.md
|
142
|
+
post_install_message:
|
143
|
+
rdoc_options: []
|
144
|
+
require_paths:
|
145
|
+
- lib
|
146
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - ">="
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - ">="
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '0'
|
156
|
+
requirements: []
|
157
|
+
rubyforge_project:
|
158
|
+
rubygems_version: 2.7.8
|
159
|
+
signing_key:
|
160
|
+
specification_version: 4
|
161
|
+
summary: Knowledge x Rails
|
162
|
+
test_files: []
|