railman 0.6.12 → 0.6.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/railman/cli.rb +11 -6
- data/lib/railman/config.rb +7 -1
- data/lib/railman/version.rb +1 -1
- data/railman.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7033d6686d77861959227d4e9b27ef5611fb93e1
|
4
|
+
data.tar.gz: 4d946a16c6168c828465fd6c6c28bb94f439245a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bde38841e330a4d2d07e514744ea6738ad8f387bc2b71f15ed823e87c22ce1b5c5f4110b84cff79763681c9c4e395feaa842d1df29968e890af54451d1a7e3ca
|
7
|
+
data.tar.gz: 4ecdd838b4391f182366b5c9370ad259ab7df3c33c83c57ddfce472c2f112f2e8509e918b48dfeaa46afcbd59f8a7da2a3540adfe830cbf91446e88ef9f25952
|
data/README.md
CHANGED
@@ -43,9 +43,10 @@ Or install it yourself as:
|
|
43
43
|
|
44
44
|
## Usage
|
45
45
|
|
46
|
-
Run `railman new APP_NAME` to create new rails application.
|
46
|
+
Run `railman new APP_NAME [--public]` to create new rails application.
|
47
47
|
Run `railman upgrade APP_NAME` to upgrade existing rails application.
|
48
48
|
|
49
|
+
If you use the `public` option, a public git repository is created, otherwise a repository will be private (default)
|
49
50
|
|
50
51
|
## Development
|
51
52
|
|
data/lib/railman/cli.rb
CHANGED
@@ -17,7 +17,9 @@ module Railman
|
|
17
17
|
File.expand_path('../../../templates', __FILE__)
|
18
18
|
end
|
19
19
|
|
20
|
-
desc "new APPNAME", "Create new rails application named APPNAME"
|
20
|
+
desc "new APPNAME [--public] [--bitbucket]", "Create new rails application named APPNAME"
|
21
|
+
option :public, type: :boolean, default: false, desc: "When true, the remote git repository is made public, otherwise the repository is private (default)"
|
22
|
+
option :bitbucket, type: :boolean, default: false, desc: "When true, Bitbucket repository is created, otherwise Github (default)"
|
21
23
|
def new(app_name)
|
22
24
|
say "Create a new rails application named: #{app_name}", :green
|
23
25
|
config = create_config(app_name)
|
@@ -50,6 +52,8 @@ module Railman
|
|
50
52
|
config.domains = [config.domain]
|
51
53
|
end
|
52
54
|
config.server = ask("What is the name of the production server?")
|
55
|
+
config.private = !options[:public]
|
56
|
+
config.vendor = options[:bitbucket] ? :bitbucket : :github
|
53
57
|
config
|
54
58
|
end
|
55
59
|
|
@@ -70,10 +74,11 @@ module Railman
|
|
70
74
|
|
71
75
|
def apply_rails_template(config, create = true)
|
72
76
|
@config = config
|
73
|
-
@repository = Creategem::Repository.new(vendor:
|
74
|
-
user: git_repository_user_name(
|
75
|
-
name:
|
76
|
-
gem_server_url: gem_server_url(
|
77
|
+
@repository = Creategem::Repository.new(vendor: config.vendor,
|
78
|
+
user: git_repository_user_name(config.vendor.to_sym),
|
79
|
+
name: config.app_name,
|
80
|
+
gem_server_url: gem_server_url(config.vendor.to_sym),
|
81
|
+
private: config.private)
|
77
82
|
@rake_secret = "TODO: generate with: rake secret"
|
78
83
|
@unicorn_behind_nginx = true
|
79
84
|
if create
|
@@ -93,7 +98,7 @@ module Railman
|
|
93
98
|
run "chmod +x bin/*"
|
94
99
|
if create
|
95
100
|
create_local_git_repository
|
96
|
-
create_remote_git_repository(@repository) if yes?("Do you want me to create
|
101
|
+
create_remote_git_repository(@repository) if yes?("Do you want me to create #{config.vendor} repository named #{@config.app_name}? (y/n)")
|
97
102
|
end
|
98
103
|
end
|
99
104
|
end
|
data/lib/railman/config.rb
CHANGED
@@ -4,6 +4,12 @@ require 'yaml'
|
|
4
4
|
# It is saved in .railman in the generated application, so that it can be used to upgrade the application later.
|
5
5
|
module Railman
|
6
6
|
class Config
|
7
|
-
attr_accessor :version, :app_name, :class_name, :admin_email, :domain,
|
7
|
+
attr_accessor :version, :app_name, :class_name, :admin_email, :domain,
|
8
|
+
:www_domain, :domains, :server, :vendor, :private
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
@private = true
|
12
|
+
@vendor = :github
|
13
|
+
end
|
8
14
|
end
|
9
15
|
end
|
data/lib/railman/version.rb
CHANGED
data/railman.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Jancev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: 0.7.4
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
138
|
+
version: 0.7.4
|
139
139
|
description: Rails application generator that speeds up develoment of new rails applications
|
140
140
|
email:
|
141
141
|
- igor@masterybits.com
|