ninsho 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +19 -10
  2. data/lib/ninsho.rb +1 -1
  3. data/lib/ninsho/version.rb +1 -1
  4. metadata +2 -2
data/README.md CHANGED
@@ -8,7 +8,7 @@ Ninsho is an easy flexible authentication solution when using providers
8
8
 
9
9
  ## Getting started
10
10
 
11
- Ninsho 0.0.1 works with rails 3.1 onwards. You can add it to your Gemfile with:
11
+ Ninsho 0.1.0 works with rails 3.1 onwards. You can add it to your Gemfile with:
12
12
 
13
13
  ```ruby
14
14
  gem 'ninsho'
@@ -121,20 +121,23 @@ So if you need to add an extra field to your ninsho model (commonly 'Authenticat
121
121
 
122
122
  Let's say we want to save the nickname from the hash into our ninsho model:
123
123
 
124
- 1. Add the migration to the ninsho model
125
- ```console
126
- rails g migration add_nickname_to_MODEL nickname:string
127
- ```
128
- 2. Run the migration and add the callback which should look like:
124
+ i. Add the migration to the ninsho model
125
+
126
+ ```console
127
+ rails g migration add_nickname_to_MODEL nickname:string
128
+ ```
129
+ ii. Run the migration and add the callback which should look like:
130
+
129
131
  ```ruby
130
132
  before_save :set_nickname
131
133
  ```
134
+
132
135
  ```ruby
133
136
  def set_nickname
134
137
  self.nickname = self.auth_hash.info.nickname
135
138
  end
136
139
  ```
137
- 3. You are good to go, and any time the user changes the nickname yours will too!
140
+ iii. You are good to go, and any time the user changes the nickname yours will too!
138
141
 
139
142
 
140
143
  ### I18n
@@ -146,16 +149,22 @@ en:
146
149
  ninsho:
147
150
  sessions:
148
151
  signed_in: "Signed in successfully"
149
- signed_out: "Signed out successfully"
152
+ signed_out: "Signed out successfully"
150
153
  ```
151
154
 
155
+ ###Psst! Here is a live example in rails
156
+
157
+ [Rails ninsho example](https://github.com/IcaliaLabs/ninsho_example)
158
+
152
159
  ### Changelog
153
160
 
154
- * Current gem version 0.0.3
161
+ * Current gem version 0.1.0
155
162
  * Add more documentation on code
156
163
  * Add aouth token for Facebook friends
157
164
  * Add more flexibility to handle authentications and save to multiple fields
158
165
  * Add handy helpers
166
+ * Add rails live example
167
+ * Released gem version 0.0.3
159
168
  * Released gem version 0.0.2
160
169
  * Released gem version 0.0.1
161
170
 
@@ -168,7 +177,7 @@ en:
168
177
  * Add tests
169
178
  * Support for Mongoid
170
179
  * Add wiki
171
- * Add rails live example
180
+
172
181
 
173
182
 
174
183
  ## Credits
@@ -37,7 +37,7 @@ module Ninsho
37
37
  # The class name for the resource relation
38
38
  # Is commonly the class User
39
39
  mattr_accessor :parent_resource_name
40
- @@parent_resource_name = ''
40
+ @@parent_resource_name = 'User'
41
41
 
42
42
  # Hash which contains omniauth configurations
43
43
  mattr_reader :omniauth_configs
@@ -1,3 +1,3 @@
1
1
  module Ninsho
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ninsho
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-27 00:00:00.000000000 Z
12
+ date: 2013-05-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: orm_adapter