neo-rails 0.0.8 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -21,6 +21,10 @@ Or install it yourself as:
21
21
 
22
22
  $ gem install neo-rails
23
23
 
24
+ You can generate base classes for your presenters and mocks with
25
+
26
+ $ rake neo-rails:setup
27
+
24
28
  ## Usage
25
29
 
26
30
  ### Presenter
@@ -1,5 +1,5 @@
1
1
  module Neo
2
2
  module Rails
3
- VERSION = "0.0.8"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
@@ -0,0 +1,27 @@
1
+ namespace :"neo-rails" do
2
+ desc "standard tasks for a new application"
3
+ task :setup do
4
+ ["build:presenter", "build:mock"].each do |task|
5
+ Rake::Task["neo-rails:#{task}"].invoke
6
+ end
7
+ end
8
+
9
+ namespace :build do
10
+ def copy_from_template(path)
11
+ templates = File.expand_path("../share/", __FILE__)
12
+ rails = Rails.root.to_s
13
+ sh "mkdir -p #{rails}/#{File.dirname path}"
14
+ cp "#{templates}/#{path}", "#{rails}/#{path}"
15
+ end
16
+
17
+ desc "build application base presenter"
18
+ task :presenter do
19
+ copy_from_template "app/presenters/presenter.rb"
20
+ end
21
+
22
+ desc "build application base mock"
23
+ task :mock do
24
+ copy_from_template "app/mocks/mock.rb"
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,3 @@
1
+ # Base class for mocks in this application
2
+ class Mock < Neo::Rails::Mock
3
+ end
@@ -0,0 +1,4 @@
1
+ # Base class for presenters in this application
2
+ class Presenter
3
+ include Neo::Rails::Presenter
4
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-09-14 00:00:00.000000000 Z
13
+ date: 2012-11-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake
@@ -122,6 +122,9 @@ files:
122
122
  - lib/neo/rails/scenarios/rails_helper.rb
123
123
  - lib/neo/rails/scenarios/test_helper.rb
124
124
  - lib/neo/rails/version.rb
125
+ - lib/tasks/neo-rails_tasks.rake
126
+ - lib/tasks/share/app/mocks/mock.rb
127
+ - lib/tasks/share/app/presenters/presenter.rb
125
128
  - neo-rails.gemspec
126
129
  - test/exposure_test.rb
127
130
  - test/helper.rb
@@ -156,3 +159,4 @@ test_files:
156
159
  - test/helper.rb
157
160
  - test/mock_test.rb
158
161
  - test/presenter_test.rb
162
+ has_rdoc: