restpack_gem 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 64e11fd1a2eb4d2918572ac7ca8eabd04b2226b1
4
- data.tar.gz: b851cb9f0b9cbd53a748448e63bdf345feb08f97
3
+ metadata.gz: d739dda7a2f43bf3c7c0a0965ff8e13bf9072e71
4
+ data.tar.gz: 11b0745d6baec11319bf675c84d73496b5fdd32d
5
5
  SHA512:
6
- metadata.gz: 31ee00a907ff568e7e4a88574a3a590bf3418b7ea39242d23f0841c46b4963426bbfc1a7a56751bfb584e6b23480f69707f07471445ece7694068bfc84e0f089
7
- data.tar.gz: a9af1e709aedb8cc6c4df0249b8b191865056b618f5116b037a664eee7b80bd92a81d8532a9cda7dd9defced45cba8420372d1e8f23632dd9180c6fc3370220f
6
+ metadata.gz: a648dc6509e624dba193a1fde5d30bad9e1088f6c62aac4e44daa9ab5bd688f99a434a62d6cf0282608a99e330fa56fa24af99ace598a4c17280167ccc80a2d6
7
+ data.tar.gz: 28239675bdf1d0d3698e397540f2a101d9f0d73300a82298ffe14cd39275f94466bd036082c8d4dfdf12a31077af65bb93b7453809bbab961bb6b75a9323d3ef
data/README.md CHANGED
@@ -1,29 +1,3 @@
1
- # RestpackGem
1
+ # restpack_gem
2
2
 
3
- TODO: Write a gem description
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- gem 'restpack_gem'
10
-
11
- And then execute:
12
-
13
- $ bundle
14
-
15
- Or install it yourself as:
16
-
17
- $ gem install restpack_gem
18
-
19
- ## Usage
20
-
21
- TODO: Write usage instructions here
22
-
23
- ## Contributing
24
-
25
- 1. Fork it
26
- 2. Create your feature branch (`git checkout -b my-new-feature`)
27
- 3. Commit your changes (`git commit -am 'Add some feature'`)
28
- 4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create new Pull Request
3
+ A set of common rake tasks for all RestPack gems
@@ -4,5 +4,10 @@ module RestPack::Gem
4
4
  load "restpack_gem/tasks/gem.rake"
5
5
  load "restpack_gem/tasks/rspec.rake"
6
6
  end
7
+
8
+ def self.load_service_tasks
9
+ self.load_tasks
10
+ load "restpack_gem/tasks/migrations.rake"
11
+ end
7
12
  end
8
13
  end
@@ -0,0 +1,35 @@
1
+ namespace :db do
2
+ desc "Creates a new migration"
3
+ task :new_migration, :name do |t, args|
4
+ name = args[:name] || ENV['name']
5
+
6
+ unless name
7
+ puts "Error: must provide name of migration to generate."
8
+ puts "For example: rake #{t.name} name=migration_name"
9
+ abort
10
+ end
11
+
12
+ create_migration(name)
13
+ end
14
+ end
15
+
16
+ def create_migration(name)
17
+ FileUtils.mkdir_p 'db/migrate'
18
+ prefix = Time.now.strftime("%Y%m%d%H%M%S")
19
+ path = "db/migrate/#{prefix}_#{name}.rb"
20
+
21
+ File.open(path, "w") do |f|
22
+ f.write(
23
+ %{class #{name.camelize} < ActiveRecord::Migration
24
+ def up
25
+
26
+ end
27
+
28
+ def down
29
+
30
+ end
31
+ end})
32
+
33
+ puts "Created #{path}"
34
+ end
35
+ end
@@ -1,5 +1,5 @@
1
1
  module RestPack
2
2
  module Gem
3
- VERSION = "0.0.9"
3
+ VERSION = "0.0.10"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restpack_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin Joyce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-06 00:00:00.000000000 Z
11
+ date: 2013-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -81,6 +81,7 @@ files:
81
81
  - lib/restpack_gem.rb
82
82
  - lib/restpack_gem/tasks.rb
83
83
  - lib/restpack_gem/tasks/gem.rake
84
+ - lib/restpack_gem/tasks/migrations.rake
84
85
  - lib/restpack_gem/tasks/rspec.rake
85
86
  - lib/restpack_gem/version.rb
86
87
  - restpack_gem.gemspec