clean_params 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZWYzZGNhZThiNDg5ZDVjYTc5YjI1ZmE3ZDJjNjc4ODgxNzIwMDg1NA==
4
+ YTJlOTkyYzZkYzhhMjU3NzY1N2I2NWJhYTg0MTUxOWM3ZjczNmY2Nw==
5
5
  data.tar.gz: !binary |-
6
- N2RiNTA4OTY5MDA3NTJiZjk4NmFmNzVmNzUyZDc0ODgwZDg2MGQyOQ==
6
+ ZDNjOWM5NTI5ZTE1NGMyMzIwMWFjZWI4Y2U1M2UxYzQyMDIyMGE0NQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjNhZDVkYzk3NzUxZDY2Njg1NTVhMWQ0MTA1NDI4NjlhYzQ0MjQ0ZGY1YWNj
10
- NTEzNDkyOTgyNzdhZmQwOTkzN2MzODQxZDE4ODZiNWE2ZjI2OGFiNjdhNTQx
11
- NzIwYTljMTMyZmEwZGM1ZDBiYzRjYTY2ODdiMDEzYzhlMjA4ODY=
9
+ MmVkMTllZWQ2ZjY4NTExZDhhODRlZDZhMzEzZDIxYmIwNDAxMTkyZDMxNzRk
10
+ ZGNmOGRkZTRjNGE2MTFhZDk5YmJlNmEzNDU1MWNiZDIwNmI5ODczOGIyNDE5
11
+ Yzc1YWExMDg2OWFjYWE5N2IyOGY1MzcxZGM3NWFkMDY3ZDBhZTc=
12
12
  data.tar.gz: !binary |-
13
- MmQyMjNmMmUwNDAxNzgyODVjNjBlMDAwZjJlYzRkOWFhYWNjMDJhZWQ2OGI3
14
- ZmIxMDE5MWU1ZjY2ZDg1ZmVmNzI0MTlmZjY3MjlhNTljODE2ZmUzYjhhY2Jh
15
- YzExZjY3NWNkYmM2ZmIzNDM0MjljNjNiNTI3MDYxNjM1YTVmMGE=
13
+ ZmM3YzMxY2QyYjE4ZjAzNDU1YTI5YzYzZDlmNDUxNjg2MjM4OTIzNDhmOTIz
14
+ YmUyYzAzM2ZiMTJmNjkxZDI2NTBmMTU5M2QzZTNlZWEyYjhjNDgxMjFmMGM4
15
+ NDlkZWViZTA3ZDVkMmFkY2IzMGQ1ODQ2MzE4NTdjY2M5MDc0MTg=
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # CleanParams
2
2
 
3
- TODO: Write a gem description
3
+ Clean Params is a Ruby gem for use with Rails to access the controller parameters cleanly.
4
+ No more ugly hash accesses. No more case sensitive checking.
4
5
 
5
6
  ## Installation
6
7
 
@@ -8,17 +9,15 @@ Add this line to your application's Gemfile:
8
9
 
9
10
  gem 'clean_params'
10
11
 
11
- And then execute:
12
+ Run the generator to create the initializer file. You can specify your parsing rules here.
12
13
 
13
- $ bundle
14
-
15
- Or install it yourself as:
16
-
17
- $ gem install clean_params
14
+ rails g clean_params:install
18
15
 
19
16
  ## Usage
20
17
 
21
- TODO: Write usage instructions here
18
+ params = CleanParams.clean(params) # params - rails params hash
19
+ params.key # => params[:key]
20
+ params.token # => params[:token]
22
21
 
23
22
  ## Contributing
24
23
 
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["yogesh.pendharkar@gmail.com"]
11
11
  spec.description = %q{Easy and clean way to maintain your params.}
12
12
  spec.summary = %q{Clean your params hash with clean_params}
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/ypendharkar/clean_params"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
@@ -1,3 +1,3 @@
1
1
  module CleanParams
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -6,7 +6,7 @@ module CleanParams
6
6
  end
7
7
 
8
8
  def copy_files
9
- template "clean_params.rb", "config/clean_params.rb"
9
+ template "clean_params.rb", "config/initializers/clean_params.rb"
10
10
  end
11
11
  end
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clean_params
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
  - Yogesh Pendharkar
@@ -55,7 +55,7 @@ files:
55
55
  - lib/clean_params/version.rb
56
56
  - lib/generators/clean_params/install_generator.rb
57
57
  - lib/generators/clean_params/templates/clean_params.rb
58
- homepage: ''
58
+ homepage: https://github.com/ypendharkar/clean_params
59
59
  licenses:
60
60
  - MIT
61
61
  metadata: {}