Skip to content

Commit

Permalink
Merge 7983f02 into 97f6457
Browse files Browse the repository at this point in the history
  • Loading branch information
scotthelm committed Jul 30, 2017
2 parents 97f6457 + 7983f02 commit 4291a15
Show file tree
Hide file tree
Showing 14 changed files with 186 additions and 186 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -11,3 +11,4 @@ spec/dummy/.sass-cache
spec/dummy/config/initializers/fencepost.rb
spec/dummy/config/fencepost.yml
coverage/
tmp/
13 changes: 6 additions & 7 deletions .travis.yml
@@ -1,12 +1,11 @@
language: ruby
rvm:
- 2.0.0
- 2.4.0
before_script:
- cd spec/dummy && RAILS_ENV=test bundle exec rake --trace db:migrate && cd ../..
- cd spec/dummy && RAILS_ENV=test bundle exec rails generate fencepost_config && cd ../..
- cd spec/dummy/config/ && cat fencepost.yml | grep -v "dob" > fencepost2.yml
- cat fencepost2.yml | grep -v "person_id" > fencepost3.yml
- mv fencepost3.yml fencepost.yml
- cd ../../..
# - cd spec/dummy && RAILS_ENV=test bundle exec rails generate fencepost_config && cd ../..
# - cd spec/dummy/config/ && cat fencepost.yml | grep -v "dob" > fencepost2.yml
# - cat fencepost2.yml | grep -v "person_id" > fencepost3.yml
# - mv fencepost3.yml fencepost.yml
script:
- bundle exec rspec spec
- bundle exec rspec
5 changes: 5 additions & 0 deletions Dockerfile
@@ -0,0 +1,5 @@
FROM ruby:2.4

RUN gem install bundler
WORKDIR /usr/src/app/
COPY . /usr/src/app
2 changes: 0 additions & 2 deletions Gemfile
Expand Up @@ -15,5 +15,3 @@ gemspec
gem 'coveralls', require: false

gem "pry-rails"
gem "pry-plus"
gem "debugger-ruby_core_source", "1.2.4"
271 changes: 130 additions & 141 deletions Gemfile.lock
Expand Up @@ -2,173 +2,162 @@ PATH
remote: .
specs:
fencepost (0.2.0)
rails (~> 4.1)
rails (>= 4.0, <= 5.2)

GEM
remote: https://rubygems.org/
specs:
actionmailer (4.1.0)
actionpack (= 4.1.0)
actionview (= 4.1.0)
mail (~> 2.5.4)
actionpack (4.1.0)
actionview (= 4.1.0)
activesupport (= 4.1.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.0)
activesupport (= 4.1.0)
actioncable (5.1.2)
actionpack (= 5.1.2)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.2)
actionpack (= 5.1.2)
actionview (= 5.1.2)
activejob (= 5.1.2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.1.2)
actionview (= 5.1.2)
activesupport (= 5.1.2)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.2)
activesupport (= 5.1.2)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.0)
activesupport (= 4.1.0)
builder (~> 3.1)
activerecord (4.1.0)
activemodel (= 4.1.0)
activesupport (= 4.1.0)
arel (~> 5.0.0)
activesupport (4.1.0)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.1.2)
activesupport (= 5.1.2)
globalid (>= 0.3.6)
activemodel (5.1.2)
activesupport (= 5.1.2)
activerecord (5.1.2)
activemodel (= 5.1.2)
activesupport (= 5.1.2)
arel (~> 8.0)
activesupport (5.1.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
arel (5.0.0)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bond (0.5.1)
builder (3.2.2)
coderay (1.1.0)
columnize (0.3.6)
coveralls (0.7.0)
multi_json (~> 1.3)
rest-client
simplecov (>= 0.7)
term-ansicolor
thor
debug_inspector (0.0.2)
debugger (1.6.3)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.2.4)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.2.4)
diff-lcs (1.2.5)
docile (1.1.3)
erubis (2.7.0)
hike (1.2.3)
i18n (0.6.9)
interception (0.5)
jist (1.5.1)
json
json (1.8.1)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
arel (8.0.0)
builder (3.2.3)
coderay (1.1.1)
concurrent-ruby (1.0.5)
coveralls (0.8.21)
json (>= 1.8, < 3)
simplecov (~> 0.14.1)
term-ansicolor (~> 1.3)
thor (~> 0.19.4)
tins (~> 1.6)
diff-lcs (1.3)
docile (1.1.5)
erubi (1.6.1)
globalid (0.4.0)
activesupport (>= 4.2.0)
i18n (0.8.6)
json (2.1.0)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.6)
mime-types (>= 1.16, < 4)
method_source (0.8.2)
mime-types (1.25.1)
minitest (5.3.2)
multi_json (1.9.2)
polyglot (0.3.4)
pry (0.9.12.6)
coderay (~> 1.0)
method_source (~> 0.8)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.2.0)
minitest (5.10.3)
nio4r (2.1.0)
nokogiri (1.8.0)
mini_portile2 (~> 2.2.0)
pry (0.10.4)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-debugger (0.2.2)
debugger (~> 1.3)
pry (~> 0.9.10)
pry-doc (0.6.0)
pry (~> 0.9)
yard (~> 0.8)
pry-docmore (0.1.1)
pry
pry-doc
pry-plus (1.0.0)
bond
jist
pry-debugger
pry-doc
pry-docmore
pry-rescue
pry-stack_explorer
pry-rails (0.3.2)
pry (>= 0.9.10)
pry-rescue (1.4.0)
interception (>= 0.4)
pry
pry-stack_explorer (0.4.9.1)
binding_of_caller (>= 0.7)
pry (>= 0.9.11)
rack (1.5.2)
rack-test (0.6.2)
pry-rails (0.3.6)
pry (>= 0.10.4)
rack (2.0.3)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.1.0)
actionmailer (= 4.1.0)
actionpack (= 4.1.0)
actionview (= 4.1.0)
activemodel (= 4.1.0)
activerecord (= 4.1.0)
activesupport (= 4.1.0)
rails (5.1.2)
actioncable (= 5.1.2)
actionmailer (= 5.1.2)
actionpack (= 5.1.2)
actionview (= 5.1.2)
activejob (= 5.1.2)
activemodel (= 5.1.2)
activerecord (= 5.1.2)
activesupport (= 5.1.2)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.0)
sprockets-rails (~> 2.0)
railties (4.1.0)
actionpack (= 4.1.0)
activesupport (= 4.1.0)
railties (= 5.1.2)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (5.1.2)
actionpack (= 5.1.2)
activesupport (= 5.1.2)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.2.2)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec-core (2.14.8)
rspec-expectations (2.14.5)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.6)
rspec-rails (2.14.2)
rake (12.0.0)
rspec-core (3.6.0)
rspec-support (~> 3.6.0)
rspec-expectations (3.6.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.6.0)
rspec-mocks (3.6.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.6.0)
rspec-rails (3.6.0)
actionpack (>= 3.0)
activemodel (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
simplecov (0.8.2)
rspec-core (~> 3.6.0)
rspec-expectations (~> 3.6.0)
rspec-mocks (~> 3.6.0)
rspec-support (~> 3.6.0)
rspec-support (3.6.0)
simplecov (0.14.1)
docile (~> 1.1.0)
multi_json
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
slop (3.5.0)
sprockets (2.12.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.1.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.9)
term-ansicolor (1.3.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.1)
slop (3.6.0)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
term-ansicolor (1.6.0)
tins (~> 1.0)
thor (0.19.1)
thread_safe (0.3.3)
tilt (1.4.1)
tins (1.1.0)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (1.1.0)
thor (0.19.4)
thread_safe (0.3.6)
tins (1.15.0)
tzinfo (1.2.3)
thread_safe (~> 0.1)
yard (0.8.7.4)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)

PLATFORMS
ruby

DEPENDENCIES
coveralls
debugger-ruby_core_source (= 1.2.4)
fencepost!
pry-plus
pry-rails
rspec-rails
sqlite3

BUNDLED WITH
1.15.3
11 changes: 11 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,11 @@
version: "2"
services:
web:
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/usr/src/app
- bundle:/usr/local/bundle
volumes:
bundle:
25 changes: 12 additions & 13 deletions fencepost.gemspec
@@ -1,24 +1,23 @@
$:.push File.expand_path("../lib", __FILE__)

# Maintain your gem's version:
require "fencepost/version"
require 'fencepost/version'

# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "fencepost"
s.name = 'fencepost'
s.version = Fencepost::VERSION
s.license = "MIT"
s.authors = ["Scott Helm"]
s.email = ["helm.scott@gmail.com"]
s.homepage = "https://github.com/scotthelm/fencepost"
s.summary = "Rails 4.x strong parameter configuration for your AR models"
s.description = "Dynamic strong parameter configuration for your AR models"
s.license = 'MIT'
s.authors = ['Scott Helm']
s.email = ['helm.scott@gmail.com']
s.homepage = 'https://github.com/scotthelm/fencepost'
s.summary = 'Rails 4.x strong parameter configuration for your AR models'
s.description = 'Dynamic strong parameter configuration for your AR models'

s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
s.files = Dir['{app,config,db,lib}/**/*', 'MIT-LICENSE', 'Rakefile', 'README.rdoc']

s.add_dependency "rails", "~> 4.1"

s.add_development_dependency "sqlite3"
s.add_development_dependency "rspec-rails"
s.add_dependency 'rails', ['>= 4.0', '<= 5.2']

s.add_development_dependency 'sqlite3'
s.add_development_dependency 'rspec-rails'
end
2 changes: 1 addition & 1 deletion lib/fencepost/fencepost.rb
Expand Up @@ -7,7 +7,7 @@ def initialize(params)
@gate = Gate.new(self.class.model_list, params)
self.class.models.each do |model|
define_singleton_method self.class.method_name(model) do
gate.open(params,self.class.param_key(model), model)
gate.open(params, self.class.param_key(model), model)
end
end
end
Expand Down

0 comments on commit 4291a15

Please sign in to comment.