pyonnuka 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/pyonnuka +22 -0
- data/bin/setup +7 -0
- data/lib/pyonnuka/app/app_generator.rb +44 -0
- data/lib/pyonnuka/templates/Gemfile +4 -0
- data/lib/pyonnuka/templates/app/views/welcome/index.html.slim +10 -0
- data/lib/pyonnuka/templates/config/application.rb +32 -0
- data/lib/pyonnuka/templates/config/test.rb +4 -0
- data/lib/pyonnuka/templates/config.ru +12 -0
- data/lib/pyonnuka/version.rb +3 -0
- data/lib/pyonnuka.rb +7 -0
- data/pyonnuka.gemspec +27 -0
- metadata +134 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: df54c79e708345fcb8a542851254b46d67f5fa35
|
4
|
+
data.tar.gz: d7d4ddf97c2a37f9496b6246e64f95787dab7b54
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 41ccf0efd6b79d7bcaf8664116b28b4c22d1ff1e76d454a8e3985006c51d326ff92a756eeee57a5a3ede09e1a6c0225108ef4469994eecc36a25533091124804
|
7
|
+
data.tar.gz: 2d7a8cdd0023e4d47025c31eed9c5419da73ed75c9f387711a2dca4b1b4dcba9a862da4ef69faece53fb67845077ed81a316f2f6104990d7afb546b1c8b9cb9d
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 masaki_nukaga
|
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
|
13
|
+
all 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
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Pyonnuka
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/pyonnuka`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'pyonnuka'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install pyonnuka
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
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).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/pyonnuka. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
36
|
+
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "pyonnuka"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/pyonnuka
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'pyonnuka'
|
4
|
+
|
5
|
+
case ARGV[0]
|
6
|
+
when 'new'
|
7
|
+
raise 'error' if ARGV[1].nil?
|
8
|
+
app_name = ARGV[1]
|
9
|
+
generator = Pyonnuka::Generators::AppGenerator.new(app_name)
|
10
|
+
generator.start
|
11
|
+
when '-h'
|
12
|
+
puts <<"EOS"
|
13
|
+
Example:
|
14
|
+
pyonnuka new ~/Code/Ruby/taskapp
|
15
|
+
|
16
|
+
This generates a skeletal Pyonnuka installation in ~/Code/Ruby/taskapp.
|
17
|
+
See the README in the newly created application to get going.
|
18
|
+
EOS
|
19
|
+
|
20
|
+
when '-v'
|
21
|
+
puts "Pyonnuka #{Pyonnuka::VERSION}"
|
22
|
+
end
|
data/bin/setup
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
module Pyonnuka
|
2
|
+
class AppBuilder
|
3
|
+
end
|
4
|
+
|
5
|
+
module Generators
|
6
|
+
require 'fileutils'
|
7
|
+
require 'erb'
|
8
|
+
|
9
|
+
class AppGenerator
|
10
|
+
def initialize app_name
|
11
|
+
@app_name = app_name
|
12
|
+
end
|
13
|
+
|
14
|
+
def start
|
15
|
+
puts "Project #{@app_name} is now creating..."
|
16
|
+
::FileUtils.mkdir(@app_name)
|
17
|
+
|
18
|
+
%w(gemfile configru app config).each do |file|
|
19
|
+
self.send("create_#{file}")
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def create_gemfile
|
24
|
+
::FileUtils.cp(File.join(File.dirname(__FILE__), '../templates/Gemfile'), "#{@app_name}/Gemfile")
|
25
|
+
end
|
26
|
+
|
27
|
+
def create_configru
|
28
|
+
::FileUtils.cp(File.join(File.dirname(__FILE__), '../templates/config.ru'), "#{@app_name}/config.ru")
|
29
|
+
end
|
30
|
+
|
31
|
+
def create_app
|
32
|
+
::FileUtils.cp_r(File.join(File.dirname(__FILE__), '../templates/app/'), "#{@app_name}/app/")
|
33
|
+
end
|
34
|
+
|
35
|
+
def create_config
|
36
|
+
::FileUtils.mkdir("#{@app_name}/config")
|
37
|
+
erb = ::ERB.new(File.read(File.join(File.dirname(__FILE__), '../templates/config/application.rb')))
|
38
|
+
File.open("#{@app_name}/config/application.rb", 'w') do |f|
|
39
|
+
f.write(erb.result(binding))
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
require 'active_support'
|
3
|
+
require 'active_support/dependencies/autoload'
|
4
|
+
require 'active_support/core_ext/kernel/reporting'
|
5
|
+
require 'active_support/core_ext/module/delegation'
|
6
|
+
require 'active_support/core_ext/array/extract_options'
|
7
|
+
|
8
|
+
module Pyonnuka
|
9
|
+
extend ActiveSupport::Autoload
|
10
|
+
|
11
|
+
autoload :WelcomeController
|
12
|
+
|
13
|
+
class << self
|
14
|
+
@application = @app_class = nil
|
15
|
+
|
16
|
+
def application
|
17
|
+
app = <%= @app_name %>::Application.new
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
module <%= @app_name %>
|
23
|
+
class Application < Pyonnuka::Application
|
24
|
+
def call(env)
|
25
|
+
env["PATH_INFO"]
|
26
|
+
[ 200,
|
27
|
+
{ 'Content-Type' => 'text/plain' },
|
28
|
+
["Ruby on Pyonnuka\n\n\n", "Hello, world!!\n", "Path : #{env["PATH_INFO"]}"]
|
29
|
+
]
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rack'
|
3
|
+
Dir[File.expand_path('../config', __FILE__) << '/*.rb'].each do |file|
|
4
|
+
require file
|
5
|
+
end
|
6
|
+
Dir[File.expand_path('../app', __FILE__) << '/*.rb'].each do |file|
|
7
|
+
require file
|
8
|
+
end
|
9
|
+
|
10
|
+
# if you want to rub production mode,
|
11
|
+
# you run "rackup config.ru -p 8080 -o 0.0.0.0"
|
12
|
+
run Pyonnuka.application
|
data/lib/pyonnuka.rb
ADDED
data/pyonnuka.gemspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'pyonnuka/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "pyonnuka"
|
8
|
+
spec.version = Pyonnuka::VERSION
|
9
|
+
spec.authors = ["masaki_nukaga"]
|
10
|
+
spec.email = ["masaki.nukaga1209@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = 'Simple web application framework.'
|
13
|
+
spec.description = 'Ruby on Pyonnuka is a simple web application framework.'
|
14
|
+
spec.homepage = "https://github.com/pyonnuka/pyonnuka"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
+
spec.add_development_dependency "rspec"
|
25
|
+
spec.add_development_dependency "activesupport"
|
26
|
+
spec.add_development_dependency "slim"
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,134 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: pyonnuka
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- masaki_nukaga
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-04-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.10'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: activesupport
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: slim
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: Ruby on Pyonnuka is a simple web application framework.
|
84
|
+
email:
|
85
|
+
- masaki.nukaga1209@gmail.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- ".rspec"
|
92
|
+
- ".travis.yml"
|
93
|
+
- CODE_OF_CONDUCT.md
|
94
|
+
- Gemfile
|
95
|
+
- LICENSE.txt
|
96
|
+
- README.md
|
97
|
+
- Rakefile
|
98
|
+
- bin/console
|
99
|
+
- bin/pyonnuka
|
100
|
+
- bin/setup
|
101
|
+
- lib/pyonnuka.rb
|
102
|
+
- lib/pyonnuka/app/app_generator.rb
|
103
|
+
- lib/pyonnuka/templates/Gemfile
|
104
|
+
- lib/pyonnuka/templates/app/views/welcome/index.html.slim
|
105
|
+
- lib/pyonnuka/templates/config.ru
|
106
|
+
- lib/pyonnuka/templates/config/application.rb
|
107
|
+
- lib/pyonnuka/templates/config/test.rb
|
108
|
+
- lib/pyonnuka/version.rb
|
109
|
+
- pyonnuka.gemspec
|
110
|
+
homepage: https://github.com/pyonnuka/pyonnuka
|
111
|
+
licenses:
|
112
|
+
- MIT
|
113
|
+
metadata: {}
|
114
|
+
post_install_message:
|
115
|
+
rdoc_options: []
|
116
|
+
require_paths:
|
117
|
+
- lib
|
118
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0'
|
123
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - ">="
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
128
|
+
requirements: []
|
129
|
+
rubyforge_project:
|
130
|
+
rubygems_version: 2.4.5
|
131
|
+
signing_key:
|
132
|
+
specification_version: 4
|
133
|
+
summary: Simple web application framework.
|
134
|
+
test_files: []
|