cloudrider 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1f7c5d1b3da6a217cc32b909b264fecd15b35358
|
|
4
|
+
data.tar.gz: 2f2c3b37a4aad869906a0b7a9794fc4a764d367b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ee44c7b355de560aa347b6392d26e4b43b33c35bacf3cd0f510579a60a1ca866439f1413b2b7038c06624471e5a5d0364da42ba59d882daa78b045bba4ecb2cc
|
|
7
|
+
data.tar.gz: 06552ee2226e5c6a627df6f09508a0eafe0d96c2076fc504c3e508aee6abb324ef8cefa5c1c9bb933e9b3e173048df11edf4c4efa969fb952970fb749b730442
|
data/lib/cloudrider/version.rb
CHANGED
|
@@ -24,18 +24,7 @@ class Cloudrider::Generators::BackendGenerator < Rails::Generators::Base
|
|
|
24
24
|
directory "app/controllers", "app/controllers"
|
|
25
25
|
directory "app/views", "app/views"
|
|
26
26
|
directory "spec", "spec"
|
|
27
|
-
directory "db/seeds", "db/seeds"
|
|
28
|
-
migration_template "db/migrate/20140930180107_create_apiv1_pictures.rb", "db/migrate/create_apiv1_pictures.rb"
|
|
29
|
-
migration_template "db/migrate/20140930052333_create_apiv1_taxons.rb", "db/migrate/create_apiv1_taxons.rb"
|
|
30
|
-
migration_template "db/migrate/20141021003733_sorcery_core.rb", "db/migrate/sorcery_core.rb"
|
|
31
|
-
migration_template "db/migrate/20140930052559_create_apiv1_listings_plastics.rb", "db/migrate/create_apiv1_listings_plastics.rb"
|
|
32
|
-
migration_template "db/migrate/20140930180108_add_attachment_pic_to_apiv1_pictures.rb", "db/migrate/add_attachment_pic_to_apiv1_pictures.rb"
|
|
33
|
-
migration_template "db/migrate/20141021003734_sorcery_remember_me.rb", "db/migrate/sorcery_remember_me.rb"
|
|
34
|
-
migration_template "db/migrate/20141010215459_create_apiv1_translations.rb", "db/migrate/create_apiv1_translations.rb"
|
|
35
|
-
migration_template "db/migrate/20141006231820_create_apiv1_employees.rb", "db/migrate/create_apiv1_employees.rb"
|
|
36
|
-
migration_template "db/migrate/20141001212635_create_apiv1_listings_taxon_relationships.rb", "db/migrate/create_apiv1_listings_taxon_relationships.rb"
|
|
37
|
-
migration_template "db/migrate/20141001063631_create_commerce_units_dimensions.rb" , "db/migrate/create_commerce_units_dimensions.rb"
|
|
38
|
-
migration_template "db/migrate/20141018235809_add_attachment_document_to_attachments.rb", "db/migrate/add_attachment_document_to_attachments.rb"
|
|
27
|
+
directory "db/seeds", "db/seeds"
|
|
39
28
|
directory "lib/tasks", "lib/tasks"
|
|
40
29
|
directory "lib/generica", "lib/generica"
|
|
41
30
|
copy_file "lib/generica.rb", "lib/generica.rb"
|
|
@@ -44,6 +33,8 @@ class Cloudrider::Generators::BackendGenerator < Rails::Generators::Base
|
|
|
44
33
|
copy_file "public/tests/dog.png", "public/tests/dog.png"
|
|
45
34
|
copy_file "config/routes.rb", "config/routes.rb"
|
|
46
35
|
copy_file "config/initializers/sorcery.rb", "config/initializers/sorcery.rb"
|
|
36
|
+
copy_file "config/initializers/i18n_backend.rb", "config/initializers/i18n_backend.rb"
|
|
47
37
|
copy_file "Gemfile", "Gemfile"
|
|
48
38
|
end
|
|
39
|
+
|
|
49
40
|
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
require 'rails/generators/migration'
|
|
2
|
+
module Cloudrider; end
|
|
3
|
+
module Cloudrider::Generators; end
|
|
4
|
+
class Cloudrider::Generators::MigrationsGenerator < Rails::Generators::Base
|
|
5
|
+
source_root File.expand_path "../../../../../generica/db/migrate", __FILE__
|
|
6
|
+
include Rails::Generators::Migration
|
|
7
|
+
class << self
|
|
8
|
+
def next_migration_number(dirname)
|
|
9
|
+
next_migration_number = current_migration_number(dirname) + 1
|
|
10
|
+
ActiveRecord::Migration.next_migration_number(next_migration_number)
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
desc "Migrations in the database migrations"
|
|
15
|
+
def install_migrations
|
|
16
|
+
_migration_rubies.each do |original_file_and_destination_file|
|
|
17
|
+
migration_template *original_file_and_destination_file
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
private
|
|
21
|
+
|
|
22
|
+
def _migration_rubies
|
|
23
|
+
_original_filenames.map { |f| [f, _destinationify_filename(f)] }
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def _original_filenames
|
|
27
|
+
Dir[File.join(source_root, "*.rb")].map { |f| f.split("/").last }
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def _destinationify_filename(f)
|
|
31
|
+
File.join "db", "migrate", f.split("_").head.join("_")
|
|
32
|
+
end
|
|
33
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cloudrider
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thomas Chen
|
|
@@ -535,6 +535,7 @@ files:
|
|
|
535
535
|
- lib/generators/cloudrider/USAGE
|
|
536
536
|
- lib/generators/cloudrider/backend/backend_generator.rb
|
|
537
537
|
- lib/generators/cloudrider/client/client_generator.rb
|
|
538
|
+
- lib/generators/cloudrider/migrations/migrations_generator.rb
|
|
538
539
|
- lib/generators/cloudrider/varissets/varissets_generator.rb
|
|
539
540
|
- spec/cloudrider/apiv1_base_spec.rb
|
|
540
541
|
- spec/cloudrider/apiv1_spec.rb
|