r4 0.1.2 → 0.1.3
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/README.md +9 -5
- data/lib/r4/installations/default.rb +10 -1
- data/lib/r4/recipes/mail_settings.rb +22 -0
- data/lib/r4/starter.rb +2 -2
- data/lib/r4/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50ab78fab12ab4e9a35ae168283d8e6d70c7d6d8
|
4
|
+
data.tar.gz: 5ae493b67980463141aeb692aa84a9734d4e531b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af988c3abd046401cb2b0e9894ab7b84e37d37207f26754cdac13ff5a777e39e193a19e0933b471422ba2174277667196a547fc9a1db47a6da2c133d546e9c9f
|
7
|
+
data.tar.gz: ff8b54ec4055b5fddbacc1dfd5ca19ff5d9a00e6740597dc2892f75454a6c32367f6aed886212a83245f1a3a479a3145ee8eacaa067d60812fa4865bf01fed2d
|
data/README.md
CHANGED
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
This gem is used for generating default project for Timepress company. However we hope it can be useful for other users as well.
|
4
4
|
|
5
|
-
## Installation
|
5
|
+
## Installation locally
|
6
6
|
|
7
|
-
|
7
|
+
You can clone project and use bundler to install gem locally with "rake install".
|
8
8
|
|
9
|
-
|
9
|
+
## Installation
|
10
10
|
|
11
|
-
|
11
|
+
Add this line to your application's Gemfile:
|
12
12
|
|
13
13
|
```ruby
|
14
14
|
gem 'r4'
|
@@ -46,9 +46,13 @@ server:
|
|
46
46
|
user: 'server_user_for_deploy'
|
47
47
|
```
|
48
48
|
|
49
|
-
Then you can create new application with r4 new name_of_app
|
49
|
+
Then you can create new application with r4 new name_of_app.
|
50
50
|
Custom installations types can be specified in 'installations' directory.
|
51
51
|
|
52
|
+
## TODO
|
53
|
+
|
54
|
+
1. provide deploy.sh for upload.rake task to actually work for others
|
55
|
+
|
52
56
|
## Development
|
53
57
|
|
54
58
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -35,10 +35,19 @@ apply 'recipes/bootstrap.rb'
|
|
35
35
|
layout_file = "#{@project_path}/app/views/layouts/application.html.erb"
|
36
36
|
remove 'app/views/layouts/application.html.erb'
|
37
37
|
copy 'app/views/layouts/application.html.erb'
|
38
|
+
apply 'recipes/mail_settings.rb'
|
38
39
|
gsub_file layout_file, 'PROJECT_NAME', @project_name
|
39
40
|
apply 'recipes/gitignore.rb'
|
40
41
|
run 'git init'
|
41
42
|
run 'git add .'
|
42
43
|
run "git commit -a -m 'Initial commit'"
|
43
44
|
|
44
|
-
rake 'app:bootstrap'
|
45
|
+
rake 'app:bootstrap'
|
46
|
+
|
47
|
+
todo =
|
48
|
+
<<TEXT
|
49
|
+
Check mail configuration in config/environments/production.rb for your server
|
50
|
+
Check upload.rake task for your server
|
51
|
+
TEXT
|
52
|
+
|
53
|
+
say todo, :green
|
@@ -0,0 +1,22 @@
|
|
1
|
+
insert_into_file "#{@project_path}/config/environments/development.rb",
|
2
|
+
after: "config.cache_classes = false\n" do
|
3
|
+
<<EOF
|
4
|
+
# Setting to send development emails to mailcatcher (install mailcatcher gem) for easier testing
|
5
|
+
config.action_mailer.default_url_options = { :host => 'localhost:3000'}
|
6
|
+
config.action_mailer.delivery_method = :smtp
|
7
|
+
config.action_mailer.smtp_settings = {:address => "127.0.0.1", :port => 1025, domain: 'localhost'}
|
8
|
+
EOF
|
9
|
+
end
|
10
|
+
|
11
|
+
insert_into_file "#{@project_path}/config/environments/production.rb",
|
12
|
+
after: "config.cache_classes = true\n" do
|
13
|
+
<<EOF
|
14
|
+
config.action_mailer.default_url_options = { :host => "#{Config.settings['server']['name']}"}
|
15
|
+
config.action_mailer.delivery_method = :smtp
|
16
|
+
config.action_mailer.smtp_settings = {
|
17
|
+
:address => "127.0.0.1",
|
18
|
+
:port => 25,
|
19
|
+
:domain => "#{Config.settings['server']['name']}"
|
20
|
+
}
|
21
|
+
EOF
|
22
|
+
end
|
data/lib/r4/starter.rb
CHANGED
@@ -43,7 +43,7 @@ class Starter < Thor
|
|
43
43
|
unless options[:type]
|
44
44
|
apply 'installations/default.rb'
|
45
45
|
else
|
46
|
-
apply "installations/#{options[:type]}"
|
46
|
+
apply "installations/#{options[:type]}.rb"
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
@@ -113,4 +113,4 @@ class Starter < Thor
|
|
113
113
|
end
|
114
114
|
end
|
115
115
|
|
116
|
-
end
|
116
|
+
end
|
data/lib/r4/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: r4
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mousse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- lib/r4/recipes/gitignore.rb
|
82
82
|
- lib/r4/recipes/install_questions.rb
|
83
83
|
- lib/r4/recipes/lazy_high_charts.rb
|
84
|
+
- lib/r4/recipes/mail_settings.rb
|
84
85
|
- lib/r4/recipes/mysql.rb
|
85
86
|
- lib/r4/recipes/rspec_generators.rb
|
86
87
|
- lib/r4/recipes/upload_app.rb
|
@@ -129,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
130
|
version: '0'
|
130
131
|
requirements: []
|
131
132
|
rubyforge_project:
|
132
|
-
rubygems_version: 2.
|
133
|
+
rubygems_version: 2.5.1
|
133
134
|
signing_key:
|
134
135
|
specification_version: 4
|
135
136
|
summary: Rails generator using Thor gem for private usage mostly
|