cybele 0.1.0 → 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 +4 -4
- data/Gemfile.lock +5 -5
- data/README.md +11 -5
- data/Rakefile +13 -1
- data/bin/cybele +0 -0
- data/cybele.gemspec +4 -4
- data/lib/cybele/app_builder.rb +20 -7
- data/lib/cybele/generators/app_generator.rb +28 -6
- data/lib/cybele/version.rb +3 -2
- data/templates/Gemfile_new +15 -0
- data/templates/app/views/layouts/application.html.haml.erb +9 -0
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9ba878b768e56df077dfd572dc1f4a79feabbae
|
4
|
+
data.tar.gz: cfac579be74c4f6b1c0ab08f3c5e75e3496cc74a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5b3dd16ffd129849950c48784de9fae13c333c4343b22f7abd92c0e5213dce79958cb86bc20886a6a899f52b271df52eb1172fb32ca411484b68a7bf070d69d
|
7
|
+
data.tar.gz: 8014ada5b5e4e6513b701ef0aeae019e18d9d8cc3faef65d0455a53037c6f4f37fdfa1588eb6ddb94aec83baf31355c8429cf26d3ce89dd77124354c8ae4f69d
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cybele (0.
|
4
|
+
cybele (0.2.0)
|
5
5
|
bundler (~> 1.3)
|
6
|
-
rails (
|
6
|
+
rails (~> 4.0.0.rc1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -33,7 +33,7 @@ GEM
|
|
33
33
|
thread_safe (~> 0.1)
|
34
34
|
tzinfo (~> 0.3.37)
|
35
35
|
arel (4.0.0)
|
36
|
-
atomic (1.1.
|
36
|
+
atomic (1.1.9)
|
37
37
|
builder (3.1.4)
|
38
38
|
erubis (2.7.0)
|
39
39
|
hike (1.2.2)
|
@@ -44,7 +44,7 @@ GEM
|
|
44
44
|
treetop (~> 1.4.8)
|
45
45
|
mime-types (1.23)
|
46
46
|
minitest (4.7.4)
|
47
|
-
multi_json (1.7.
|
47
|
+
multi_json (1.7.3)
|
48
48
|
polyglot (0.3.3)
|
49
49
|
rack (1.5.2)
|
50
50
|
rack-test (0.6.2)
|
@@ -75,7 +75,7 @@ GEM
|
|
75
75
|
thor (0.18.1)
|
76
76
|
thread_safe (0.1.0)
|
77
77
|
atomic
|
78
|
-
tilt (1.4.
|
78
|
+
tilt (1.4.1)
|
79
79
|
treetop (1.4.12)
|
80
80
|
polyglot
|
81
81
|
polyglot (>= 0.3.1)
|
data/README.md
CHANGED
@@ -2,21 +2,27 @@
|
|
2
2
|
|
3
3
|
NOTE: Don't use this gem until v1.0.0
|
4
4
|
|
5
|
-
This is yet an other Rails Template which inspired from [
|
5
|
+
This is yet an other Rails Template which inspired from [suspenders](https://github.com/thoughtbot/suspenders).
|
6
6
|
|
7
|
-
**Cybele** pron.: /ˈsɪbɨliː/ was an originally Anatolian mother goddess. Little is known of her oldest Anatolian cults,
|
7
|
+
**Cybele** pron.: /ˈsɪbɨliː/ was an originally Anatolian mother goddess. Little is known of her oldest Anatolian cults,
|
8
|
+
other than her association with mountains, hawks and lions. She may have been Phrygia's State deity; her Phrygian cult
|
9
|
+
was adopted and adapted by Greek colonists of Asia Minor, and spread from there to mainland Greece and its more distant
|
10
|
+
western colonies from around the 6th century BCE.
|
8
11
|
|
9
12
|
## Requirements
|
10
13
|
|
11
14
|
Before generating your application, you will need:
|
12
15
|
|
13
|
-
* Ruby 2.0
|
14
|
-
* Rails 4.0
|
16
|
+
* Ruby ~> 2.0
|
17
|
+
* Rails ~> 4.0
|
15
18
|
|
16
19
|
## Usage
|
17
20
|
|
21
|
+
First you should install the cybele gem than you can use it for creating new gem.
|
22
|
+
|
18
23
|
```ruby
|
19
|
-
cybele
|
24
|
+
gem install cybele
|
25
|
+
cybele project_name
|
20
26
|
```
|
21
27
|
|
22
28
|
## What cybele do and included?
|
data/Rakefile
CHANGED
@@ -1 +1,13 @@
|
|
1
|
-
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
require 'bundler/gem_tasks'
|
4
|
+
require 'rdoc/task'
|
5
|
+
|
6
|
+
desc 'Generate documentation for the Cybele gem.'
|
7
|
+
Rake::RDocTask.new(:rdoc) do |rdoc|
|
8
|
+
rdoc.rdoc_dir = 'rdoc'
|
9
|
+
rdoc.title = 'Cybele'
|
10
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
11
|
+
rdoc.rdoc_files.include('README.md')
|
12
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
13
|
+
end
|
data/bin/cybele
CHANGED
File without changes
|
data/cybele.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'cybele/version'
|
4
|
+
require File.expand_path('../lib/cybele/version', __FILE__)
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'cybele'
|
@@ -15,15 +15,15 @@ Gem::Specification.new do |spec|
|
|
15
15
|
|
16
16
|
spec.required_ruby_version = '>= 2.0.0'
|
17
17
|
spec.add_dependency 'bundler', '~> 1.3'
|
18
|
-
spec.add_dependency 'rails', '4.0.0.rc1'
|
18
|
+
spec.add_dependency 'rails', '~> 4.0.0.rc1'
|
19
19
|
|
20
20
|
spec.files = `git ls-files`.split($/)
|
21
21
|
spec.executables = %w[cybele]
|
22
22
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
23
23
|
spec.require_paths = %w[lib]
|
24
24
|
|
25
|
-
spec.add_development_dependency
|
26
|
-
spec.add_development_dependency
|
25
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
26
|
+
spec.add_development_dependency 'rake'
|
27
27
|
|
28
28
|
spec.extra_rdoc_files = %w[README.md LICENSE.txt]
|
29
29
|
end
|
data/lib/cybele/app_builder.rb
CHANGED
@@ -1,22 +1,35 @@
|
|
1
|
-
module Cybele
|
2
|
-
class AppBuilder < Rails::AppBuilder
|
1
|
+
module Cybele #:nodoc:#
|
3
2
|
|
4
|
-
|
5
|
-
|
3
|
+
# Public: This allows you to override entire operations, like the creation of the
|
4
|
+
# Gemfile_new, README, or JavaScript files, without needing to know exactly
|
5
|
+
# what those operations do so you can create another template action.
|
6
|
+
class AppBuilder < Rails::AppBuilder
|
6
7
|
|
7
|
-
|
8
|
+
# Internal: Overwrite super class readme
|
9
|
+
def readme
|
8
10
|
template 'README.md.erb', 'README.md', :force => true
|
9
11
|
end
|
10
12
|
|
13
|
+
# Remove: Remove public index file
|
11
14
|
def remove_public_index
|
12
|
-
say 'public'
|
13
15
|
remove_file 'public/index.html'
|
14
16
|
end
|
15
17
|
|
18
|
+
# Internal: Remove README.rdoc file
|
16
19
|
def remove_readme_rdoc
|
17
|
-
say 'readme'
|
18
20
|
remove_file 'README.rdoc'
|
19
21
|
end
|
20
22
|
|
23
|
+
# Internal: Replace gemfile
|
24
|
+
def replace_gemfile
|
25
|
+
remove_file 'Gemfile'
|
26
|
+
copy_file 'Gemfile_new', 'Gemfile'
|
27
|
+
end
|
28
|
+
|
29
|
+
# Internal: Replace erb files with html files
|
30
|
+
def replace_erb_with_haml
|
31
|
+
remove_file 'app/views/layouts/application.html.erb'
|
32
|
+
template 'app/views/layouts/application.html.haml.erb', 'app/views/layouts/application.html.haml', :force => true
|
33
|
+
end
|
21
34
|
end
|
22
35
|
end
|
@@ -1,40 +1,62 @@
|
|
1
1
|
require 'rails/generators'
|
2
2
|
require 'rails/generators/rails/app/app_generator'
|
3
3
|
|
4
|
-
module Cybele
|
4
|
+
module Cybele #:nodoc:#
|
5
|
+
|
6
|
+
# Public: This allows you to override entire operations, like the creation of the
|
7
|
+
# Gemfile_new, README, or JavaScript files, without needing to know exactly
|
8
|
+
# what those operations do so you can create another template action.
|
5
9
|
class AppGenerator < Rails::Generators::AppGenerator
|
10
|
+
|
11
|
+
# Internal: Default use postgresql
|
6
12
|
class_option :database, :type => :string, :aliases => '-d', :default => 'postgresql',
|
7
13
|
:desc => "Preconfigure for selected database (options: #{DATABASES.join('/')})"
|
8
14
|
|
15
|
+
# Internal: Default skip Test::Unit
|
9
16
|
class_option :skip_test_unit, :type => :boolean, :aliases => '-T', :default => true,
|
10
17
|
:desc => 'Skip Test::Unit files'
|
11
18
|
|
19
|
+
# Internal: Finish template
|
12
20
|
def finish_template
|
13
21
|
invoke :customization
|
14
22
|
super
|
15
23
|
end
|
16
24
|
|
25
|
+
# Internal: Customization template
|
17
26
|
def customization
|
18
|
-
invoke :
|
27
|
+
invoke :customize_gemfile
|
19
28
|
invoke :remove_files_we_dont_need
|
29
|
+
invoke :replace_files
|
20
30
|
end
|
21
31
|
|
22
|
-
|
23
|
-
|
24
|
-
build :
|
32
|
+
# Internal: Customize gemfile
|
33
|
+
def customize_gemfile
|
34
|
+
build :replace_gemfile
|
35
|
+
bundle_command 'install --binstubs=bin/stubs'
|
25
36
|
end
|
26
37
|
|
38
|
+
# Internal: Remove files don't need
|
27
39
|
def remove_files_we_dont_need
|
28
40
|
say 'Remove files we don\'t need'
|
29
41
|
build :remove_public_index
|
30
42
|
build :remove_readme_rdoc
|
31
43
|
end
|
32
44
|
|
45
|
+
# Internal: Replace files
|
46
|
+
def replace_files
|
47
|
+
say 'Replace files'
|
48
|
+
build :replace_erb_with_haml
|
49
|
+
end
|
50
|
+
|
51
|
+
# Internal: Let's not: We'll bundle manually at the right spot.
|
52
|
+
def run_bundle
|
53
|
+
end
|
54
|
+
|
33
55
|
protected
|
34
56
|
|
57
|
+
# Internal: We need get_builder class
|
35
58
|
def get_builder_class
|
36
59
|
Cybele::AppBuilder
|
37
60
|
end
|
38
|
-
|
39
61
|
end
|
40
62
|
end
|
data/lib/cybele/version.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'rails', '~> 4.0.0.rc1'
|
4
|
+
gem 'pg'
|
5
|
+
gem 'sass-rails', '~> 4.0.0.rc1'
|
6
|
+
gem 'uglifier', '>= 1.3.0'
|
7
|
+
gem 'coffee-rails', '~> 4.0.0'
|
8
|
+
gem 'jquery-rails'
|
9
|
+
gem 'turbolinks'
|
10
|
+
gem "haml", "~> 4.0.2"
|
11
|
+
gem "haml-rails", "~> 0.4"
|
12
|
+
|
13
|
+
group :doc do
|
14
|
+
gem 'sdoc', require: false
|
15
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cybele
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lab2023
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
name: rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 4.0.0.rc1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 4.0.0.rc1
|
41
41
|
- !ruby/object:Gem::Dependency
|
@@ -86,7 +86,9 @@ files:
|
|
86
86
|
- lib/cybele/app_builder.rb
|
87
87
|
- lib/cybele/generators/app_generator.rb
|
88
88
|
- lib/cybele/version.rb
|
89
|
+
- templates/Gemfile_new
|
89
90
|
- templates/README.md.erb
|
91
|
+
- templates/app/views/layouts/application.html.haml.erb
|
90
92
|
homepage: https://github.com/lab2023/cybele
|
91
93
|
licenses:
|
92
94
|
- MIT
|