coast 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -118,6 +118,18 @@ Note the authorize method signature. The first arg is the **action** being perfo
118
118
 
119
119
  While originally written to support [CanCan](https://github.com/ryanb/cancan), its pretty simple to take control and manage authorization yourself.
120
120
 
121
+ ## Localization
122
+
123
+ Enable I18n internationalization with a simple method call.
124
+
125
+ ```ruby
126
+ # app/controllers/beach_bums_controller.rb
127
+ class BeachBumsController < ApplicationController
128
+ include Coast
129
+ set_localized true
130
+ end
131
+ ```
132
+
121
133
  ## Advanced Usage
122
134
 
123
135
  Coast comes with few tricks up its sleeve.
@@ -157,27 +169,18 @@ class BeachBumsController < ApplicationController
157
169
  end
158
170
  ```
159
171
 
160
- ## Testing
161
-
162
- There are some interesting additions to MiniTest::Mock since I mock some of Rails to make testing fast & fun.
163
-
164
- Poke around the test code and let me know what you think.
165
-
166
- How to run the tests.
172
+ ## Running the Tests
167
173
 
168
174
  ```bash
169
- $rvm 1.9.3
170
- $gem install bundler
171
- $bundle
172
- $rake test
175
+ $ gem install coast
176
+ $ gem unpack coast
177
+ $ cd coast-[VERSION]
178
+ $ bundle
179
+ $ mt
173
180
  ```
174
181
 
175
182
  Ahh... passing tests.
176
183
 
177
- ## Contributing
178
-
179
- I'm looking for hand-outs, so please fork and submit pull requests. Bug fixes, features, whatever...
180
-
181
184
  ## Nods
182
185
 
183
186
  [I'm tired of writing RESTful boilerplate (& scaffold is overkill), so I'm stoked natehop released the Coast gem.](https://twitter.com/tehviking/status/189739333857710080)
@@ -1,3 +1,3 @@
1
1
  module Coast
2
- VERSION = "0.9.4"
2
+ VERSION = "0.9.5"
3
3
  end
@@ -19,9 +19,8 @@ class TestCoast < MicroTest::Test
19
19
  mock.stub(:destroyed?) { @destroyed }
20
20
  mock.stub(:update_attributes) { |*args| @attributes_updated = true }
21
21
  mock.stub(:save) { |*args| @saved = true }
22
- mock.stub(:table_name) { "mocks" }
23
22
  mock.class.stub(:find) { |*args| TestCoast.mock_model }
24
- mock.class.stub(:all) { [1..5].map { TestCoast.mock_model } }
23
+ mock.class.stub(:all) { (1..5).map { TestCoast.mock_model } }
25
24
  mock
26
25
  end
27
26
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
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: 2012-11-17 00:00:00.000000000 Z
12
+ date: 2012-11-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport