ponytail 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -0
- data/README.md +17 -6
- data/app/views/ponytail/migrations/_notice.html.erb +1 -0
- data/app/views/ponytail/migrations/index.html.erb +5 -3
- data/app/views/ponytail/migrations/new.html.erb +2 -0
- data/config/routes.rb +1 -6
- data/lib/ponytail/migration.rb +4 -0
- data/lib/ponytail/version.rb +1 -1
- data/lib/ponytail.rb +1 -0
- data/lib/rails/mapper.rb +12 -0
- data/ponytail.gemspec +1 -1
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3abe40fddc7790c3c4df41e86756bff646adb10a
|
4
|
+
data.tar.gz: 0b5606b7198008fee75171c6c62926b6fc2bbc71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed5138f2740020d332fcacd9ca100046b01fb7573face47cb000768db84d307d5cdb9ab08a0d7cf97fc47a680b39ba072bae20aefab98c97998404ae689155a7
|
7
|
+
data.tar.gz: dae7e9101eb822be5f73c9a9917bdccca4648eaf5f573b7e587aea6182e07180141b217d87a34fc0de373a668a57c7359690c300568f1ec919395278794ad050
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,24 +1,35 @@
|
|
1
1
|
# Ponytail
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/sinsoku/ponytail.png?branch=develop)](https://travis-ci.org/sinsoku/ponytail)
|
4
|
+
|
3
5
|
Ponytail is a Rails engine that shows the migrations.
|
4
6
|
|
5
7
|
## Installation
|
6
8
|
|
7
|
-
Add
|
9
|
+
Add `ponytail` to `:development` groups in your application's Gemfile:
|
8
10
|
|
9
|
-
|
11
|
+
```ruby
|
12
|
+
group :development do
|
13
|
+
gem 'ponytail'
|
14
|
+
end
|
15
|
+
```
|
10
16
|
|
11
17
|
And then execute:
|
12
18
|
|
13
|
-
|
19
|
+
```bash
|
20
|
+
$ bundle
|
21
|
+
```
|
14
22
|
|
15
|
-
|
23
|
+
Comment out `config.active_record.migration_error` in `config/environments/development.rb`.
|
16
24
|
|
17
|
-
|
25
|
+
```ruby
|
26
|
+
# Raise an error on page load if there are pending migrations
|
27
|
+
# config.active_record.migration_error = :page_load
|
28
|
+
```
|
18
29
|
|
19
30
|
## Usage
|
20
31
|
|
21
|
-
|
32
|
+
Visit `/rails/migrations` in your app.
|
22
33
|
|
23
34
|
## Contributing
|
24
35
|
|
@@ -0,0 +1 @@
|
|
1
|
+
<span class="pt_notice"><%= notice %></span>
|
@@ -1,11 +1,13 @@
|
|
1
|
+
<%= render 'notice' %>
|
2
|
+
|
1
3
|
<% @migrations.each do |migration| %>
|
2
4
|
<%= render 'migration', migration: migration, current: @current_version %>
|
3
5
|
<% end %>
|
4
6
|
|
5
7
|
<div class="pt_actions">
|
6
|
-
<%= button_to 'New', new_migration_path, class: 'pt_new', method: :get %>
|
7
|
-
<%= button_to 'Migrate', migrate_migrations_path, class: 'pt_migrate' %>
|
8
|
-
<%= button_to 'Rollback', rollback_migrations_path, class: 'pt_rallback' %>
|
8
|
+
<%= button_to 'New', new_migration_path, class: 'pt_new', method: :get, disabled: Ponytail::Migration.check_pending? %>
|
9
|
+
<%= button_to 'Migrate', migrate_migrations_path, class: 'pt_migrate', disabled: Ponytail::Migration.check_pending? %>
|
10
|
+
<%= button_to 'Rollback', rollback_migrations_path, class: 'pt_rallback', disabled: Ponytail::Migration.check_pending? %>
|
9
11
|
</div>
|
10
12
|
|
11
13
|
<script type='text/javascript'>
|
data/config/routes.rb
CHANGED
data/lib/ponytail/migration.rb
CHANGED
@@ -4,6 +4,10 @@ module Ponytail
|
|
4
4
|
attr_accessor :name, :filename, :version, :raw_content
|
5
5
|
|
6
6
|
class << self
|
7
|
+
def check_pending?
|
8
|
+
Rails.application.config.middleware.include?(ActiveRecord::Migration::CheckPending)
|
9
|
+
end
|
10
|
+
|
7
11
|
def all
|
8
12
|
proxys = ActiveRecord::Migrator.migrations(migrations_paths)
|
9
13
|
proxys.map { |p| new(name: p.name, filename: p.filename, version: p.version) }
|
data/lib/ponytail/version.rb
CHANGED
data/lib/ponytail.rb
CHANGED
data/lib/rails/mapper.rb
ADDED
data/ponytail.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency 'rails'
|
21
|
+
spec.add_dependency 'rails', '~> 4.0'
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
24
24
|
spec.add_development_dependency "rake"
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ponytail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sinsoku
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
19
|
+
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
26
|
+
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,6 +86,7 @@ files:
|
|
86
86
|
- app/controllers/ponytail/migrations_controller.rb
|
87
87
|
- app/views/layouts/ponytail/application.html.erb
|
88
88
|
- app/views/ponytail/migrations/_migration.html.erb
|
89
|
+
- app/views/ponytail/migrations/_notice.html.erb
|
89
90
|
- app/views/ponytail/migrations/index.html.erb
|
90
91
|
- app/views/ponytail/migrations/new.html.erb
|
91
92
|
- config/routes.rb
|
@@ -93,6 +94,7 @@ files:
|
|
93
94
|
- lib/ponytail/engine.rb
|
94
95
|
- lib/ponytail/migration.rb
|
95
96
|
- lib/ponytail/version.rb
|
97
|
+
- lib/rails/mapper.rb
|
96
98
|
- ponytail.gemspec
|
97
99
|
- spec/migration_spec.rb
|
98
100
|
- spec/ponytail_spec.rb
|