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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0765b25e422ff4156cce6a14dcadd45c025d30b4
4
- data.tar.gz: 4968dd62c06c7939662e0f5ad68238d019dd51f8
3
+ metadata.gz: 7033d6686d77861959227d4e9b27ef5611fb93e1
4
+ data.tar.gz: 4d946a16c6168c828465fd6c6c28bb94f439245a
5
5
  SHA512:
6
- metadata.gz: b629a963c288fc4dead475265625cb1ae0d1a64a278b38af5b4dc413effbc4f641e2322de40f49348dc00a0d32410d49903be4a48a1224fe8d51668572af7d97
7
- data.tar.gz: 3479a1d3ed26ff47574d6f3f9ae0fd8c1a48949232dddf8130c6277828e53feaf29b977c484f28eba05b537bdeae911a58022d11f3e65b787fc1f9b2a75500b8
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: :bitbucket,
74
- user: git_repository_user_name(:bitbucket),
75
- name: @config.app_name,
76
- gem_server_url: gem_server_url(:bitbucket))
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 bitbucket repository named #{@config.app_name}? (y/n)")
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
@@ -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, :www_domain, :domains, :server
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
@@ -1,3 +1,3 @@
1
1
  module Railman
2
- VERSION = '0.6.12'
2
+ VERSION = '0.6.13'
3
3
  end
data/railman.gemspec CHANGED
@@ -26,5 +26,5 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency "coveralls"
27
27
 
28
28
  spec.add_dependency "thor", "~> 0.19"
29
- spec.add_dependency "creategem", "~> 0.2"
29
+ spec.add_dependency "creategem", "~> 0.7.4"
30
30
  end
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.12
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-07 00:00:00.000000000 Z
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: '0.2'
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: '0.2'
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