pineapples 0.1.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 +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.ruby-version +1 -0
- data/.travis.yml +4 -0
- data/Gemfile +3 -0
- data/LICENSE +22 -0
- data/README.md +33 -0
- data/Rakefile +8 -0
- data/bin/pineapples +18 -0
- data/bin/rake +15 -0
- data/bin/rspec +14 -0
- data/bin/setup +13 -0
- data/lib/pineapples/actions.rb +39 -0
- data/lib/pineapples/version.rb +5 -0
- data/lib/pineapples.rb +3 -0
- data/pineapples.gemspec +43 -0
- metadata +107 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d5ed18a509d099566d64609ab821db288ce0afe8
|
4
|
+
data.tar.gz: b992e9901788c706d83b2c725754c59be5f35c93
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8cefd568c868fa1950afc8482cde7ac622634e21a8560bfc8b2289ccf017a021b34dd00e0ef7479a125b12cc30081bbd288a98cba2e420b6b2920fb3791b6d6b
|
7
|
+
data.tar.gz: 5bbe87d1fbacc84230db364348e83eb86c4bac7422306786cf752cc798d88bcfb8b127349cf64ef298486da1f2c3d505cef2fda20fd2dd35bf97572af503f6db
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.2.3
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 pineapplethief
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
data/README.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# Pineapples
|
2
|
+
|
3
|
+
Rails app generator based on Suspenders by Thoughtbot and Raygun by Carbon Five modified to fit my own personal needs.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Install this gem in global gemset using
|
8
|
+
|
9
|
+
$ gem install pineapples
|
10
|
+
|
11
|
+
|
12
|
+
And then execute:
|
13
|
+
|
14
|
+
$ pineapples <project_name>
|
15
|
+
|
16
|
+
## Usage
|
17
|
+
|
18
|
+
TODO: Write usage instructions here
|
19
|
+
|
20
|
+
## Development
|
21
|
+
|
22
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
23
|
+
|
24
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
25
|
+
|
26
|
+
## Contributing
|
27
|
+
|
28
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/pineapplethief/pineapples.
|
29
|
+
|
30
|
+
|
31
|
+
## License
|
32
|
+
|
33
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/pineapples
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
source_path = (Pathname.new(__FILE__).dirname + '../lib').expand_path
|
5
|
+
$LOAD_PATH << source_path
|
6
|
+
|
7
|
+
require 'pineapples'
|
8
|
+
|
9
|
+
if ['create', '--create'].include? ARGV[0]
|
10
|
+
ARGV.shift
|
11
|
+
puts "[WARNING] the suspenders create argument is deprecated. Just use `suspenders #{ARGV.join}` instead"
|
12
|
+
end
|
13
|
+
|
14
|
+
templates_root = File.expand_path(File.join('..', 'templates'), File.dirname(__FILE__))
|
15
|
+
Pineapples::AppGenerator.source_root templates_root
|
16
|
+
Pineapples::AppGenerator.source_paths << Rails::Generators::AppGenerator.source_root << templates_root
|
17
|
+
|
18
|
+
Pineapples::AppGenerator.start
|
data/bin/rake
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'rake' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', Pathname.new(__FILE__).realpath)
|
11
|
+
|
12
|
+
require 'rubygems'
|
13
|
+
require 'bundler/setup'
|
14
|
+
|
15
|
+
load Gem.bin_path('rake', 'rake')
|
data/bin/rspec
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'rspec' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
|
8
|
+
require 'pathname'
|
9
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', Pathname.new(__FILE__).realpath)
|
10
|
+
|
11
|
+
require 'rubygems'
|
12
|
+
require 'bundler/setup'
|
13
|
+
|
14
|
+
load Gem.bin_path('rspec-core', 'rspec')
|
data/bin/setup
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/usr/bin/env sh
|
2
|
+
|
3
|
+
# Run this script immediately after cloning the codebase.
|
4
|
+
|
5
|
+
# Exit if any subcommand fails
|
6
|
+
set -e
|
7
|
+
|
8
|
+
# Set up Ruby dependencies via Bundler
|
9
|
+
bundle install
|
10
|
+
|
11
|
+
# Add binstubs to PATH in ~/.zshenv like this:
|
12
|
+
# export PATH=".git/safe/../../bin:$PATH"
|
13
|
+
mkdir -p .git/safe
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Pineapples
|
2
|
+
module Actions
|
3
|
+
def replace_file(relative_path, *args)
|
4
|
+
remove_file(relative_path)
|
5
|
+
copy_file(relative_path, *args)
|
6
|
+
end
|
7
|
+
|
8
|
+
def replace_in_file(relative_path, find, replace)
|
9
|
+
path = File.join(destination_root, relative_path)
|
10
|
+
contents = IO.read(path)
|
11
|
+
unless contents.gsub!(find, replace)
|
12
|
+
raise "#{find.inspect} not found in #{relative_path}"
|
13
|
+
end
|
14
|
+
File.open(path, "w") { |file| file.write(contents) }
|
15
|
+
end
|
16
|
+
|
17
|
+
def action_mailer_host(rails_env, host)
|
18
|
+
config = "config.action_mailer.default_url_options = {host: #{host}}"
|
19
|
+
configure_environment(rails_env, config)
|
20
|
+
end
|
21
|
+
|
22
|
+
def configure_application_file(config)
|
23
|
+
inject_into_file(
|
24
|
+
"config/application.rb",
|
25
|
+
"\n\n #{config}",
|
26
|
+
before: "\n end"
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
def configure_environment(rails_env, config)
|
31
|
+
inject_into_file(
|
32
|
+
"config/environments/#{rails_env}.rb",
|
33
|
+
"\n\n #{config}",
|
34
|
+
before: "\nend"
|
35
|
+
)
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
data/lib/pineapples.rb
ADDED
data/pineapples.gemspec
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'pineapples/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.required_ruby_version = ">= #{Pineapples::RUBY_VERSION}"
|
8
|
+
|
9
|
+
spec.name = 'pineapples'
|
10
|
+
spec.version = Pineapples::VERSION
|
11
|
+
spec.authors = ['Alexey Glukhov']
|
12
|
+
spec.email = ['gluhov985@gmail.com']
|
13
|
+
|
14
|
+
spec.summary = 'Generate a Rails app loaded with must-have gems and best practices'
|
15
|
+
spec.description = <<-HERE
|
16
|
+
Rails app generator based on Suspenders by Thoughtbot and Raygun by Carbon Five modified to fit my own personal needs
|
17
|
+
HERE
|
18
|
+
spec.homepage = 'http://github.com/pineapplethief/pineapples'
|
19
|
+
spec.license = 'MIT'
|
20
|
+
|
21
|
+
spec.extra_rdoc_files = %w[README.md LICENSE]
|
22
|
+
spec.rdoc_options = ['--charset=UTF-8']
|
23
|
+
|
24
|
+
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
25
|
+
# delete this section to allow pushing this gem to any host.
|
26
|
+
# if spec.respond_to?(:metadata)
|
27
|
+
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
28
|
+
# else
|
29
|
+
# raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
|
30
|
+
# end
|
31
|
+
|
32
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
33
|
+
# spec.bindir = 'bin'
|
34
|
+
spec.executables = ['pineapples']
|
35
|
+
spec.require_paths = ['lib']
|
36
|
+
|
37
|
+
spec.required_rubygems_version = '>= 2.1'
|
38
|
+
|
39
|
+
spec.add_dependency 'rails', Pineapples::RAILS_VERSION
|
40
|
+
spec.add_dependency 'bundler', '~> 1.10'
|
41
|
+
|
42
|
+
spec.add_development_dependency 'rspec', '~> 3.2'
|
43
|
+
end
|
metadata
ADDED
@@ -0,0 +1,107 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: pineapples
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alexey Glukhov
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.10'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.10'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.2'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.2'
|
55
|
+
description: |
|
56
|
+
Rails app generator based on Suspenders by Thoughtbot and Raygun by Carbon Five modified to fit my own personal needs
|
57
|
+
email:
|
58
|
+
- gluhov985@gmail.com
|
59
|
+
executables:
|
60
|
+
- pineapples
|
61
|
+
extensions: []
|
62
|
+
extra_rdoc_files:
|
63
|
+
- README.md
|
64
|
+
- LICENSE
|
65
|
+
files:
|
66
|
+
- ".gitignore"
|
67
|
+
- ".rspec"
|
68
|
+
- ".ruby-version"
|
69
|
+
- ".travis.yml"
|
70
|
+
- Gemfile
|
71
|
+
- LICENSE
|
72
|
+
- README.md
|
73
|
+
- Rakefile
|
74
|
+
- bin/pineapples
|
75
|
+
- bin/rake
|
76
|
+
- bin/rspec
|
77
|
+
- bin/setup
|
78
|
+
- lib/pineapples.rb
|
79
|
+
- lib/pineapples/actions.rb
|
80
|
+
- lib/pineapples/version.rb
|
81
|
+
- pineapples.gemspec
|
82
|
+
homepage: http://github.com/pineapplethief/pineapples
|
83
|
+
licenses:
|
84
|
+
- MIT
|
85
|
+
metadata: {}
|
86
|
+
post_install_message:
|
87
|
+
rdoc_options:
|
88
|
+
- "--charset=UTF-8"
|
89
|
+
require_paths:
|
90
|
+
- lib
|
91
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 2.2.3
|
96
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '2.1'
|
101
|
+
requirements: []
|
102
|
+
rubyforge_project:
|
103
|
+
rubygems_version: 2.4.8
|
104
|
+
signing_key:
|
105
|
+
specification_version: 4
|
106
|
+
summary: Generate a Rails app loaded with must-have gems and best practices
|
107
|
+
test_files: []
|