pyonnuka 0.1.4 → 0.1.5

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: 82a925dc910ffd19603cc86fd54c8e5f0fb67820
4
- data.tar.gz: aab968267b89b23522844dc3fa41c8bdd7a328a9
3
+ metadata.gz: 5448cfcee7489c1c7333a357b117d1a60763f015
4
+ data.tar.gz: 4e96797142eacecc529581d4788b2bb456e86b1c
5
5
  SHA512:
6
- metadata.gz: e0800bfae7b5dbd8f40fb0e964d647957390bdd3e6046df3c1afe98559d477623a2f48093ed8f0f28e918baf77cb826c70cc9738a99d96b755a6a61d0867be5a
7
- data.tar.gz: c0f89ba495fc47ee0388d710ee875b797f4dd5f0292ddd712f07776358ad3b7247b4d5747bd8433af161da80c647c04cf3afe64852c1d0bfa62fd006b822d432
6
+ metadata.gz: 991d69d6b825555e483d88355949ee889d340f7f7f14b0ed3d411d6042922e9dcc68929ecaca7ca19ca12689a9bb0e62d5016f6decaa9a0e8be6b284173c1744
7
+ data.tar.gz: 809e3e151c65f07a8eced77bdb9246a8c93e45f44e3a8ef79b07d3bf273ccc3898b814128bcf0fff4493263f24acbd94ec83a70c4a2e231201a49514a76a0b61
@@ -0,0 +1,24 @@
1
+ module Pyonnuka
2
+ class Application
3
+ class Server
4
+ class << self
5
+ def start(command)
6
+ production_option = 'all_of_the_world'
7
+
8
+ if command[1] == production_option
9
+ on_server(' -p 8080 -o 0.0.0.0')
10
+ elsif command[1].nil?
11
+ on_server
12
+ else
13
+ puts "warning: on server with unknown mode #{command[1]}"
14
+ on_server
15
+ end
16
+ end
17
+
18
+ def on_server(option=nil)
19
+ system("rackup #{option}")
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -1,5 +1,3 @@
1
- require 'pyonnuka/helpers/commands'
2
-
3
1
  module Pyonnuka
4
2
  class Command < Pyonnuka::Helpers::Command
5
3
  class << self
@@ -13,8 +11,10 @@ module Pyonnuka
13
11
  when 'new'
14
12
  app_path = command[1]
15
13
  return unless validate_app_path(app_path)
16
- generator = Pyonnuka::Generators::AppGenerator.new(app_name)
14
+ generator = Pyonnuka::Generators::AppGenerator.new(app_path)
17
15
  generator.start
16
+ when 'ikeikegogo'
17
+ Pyonnuka::Application::Server.start(ARGV)
18
18
  when '-h'
19
19
  out_help
20
20
  when '-v'
@@ -1,4 +1,4 @@
1
- require 'oyonnuka'
1
+ require 'pyonnuka'
2
2
  require 'pathname'
3
3
  require 'active_support'
4
4
  require 'active_support/dependencies/autoload'
@@ -1,3 +1,3 @@
1
1
  module Pyonnuka
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
data/lib/pyonnuka.rb CHANGED
@@ -2,6 +2,8 @@ require 'active_support'
2
2
  require 'active_support/core_ext'
3
3
  require 'pyonnuka/version'
4
4
  require 'pyonnuka/app/app_generator'
5
+ require 'pyonnuka/helpers/commands'
6
+ require 'pyonnuka/app/application'
5
7
 
6
8
  module Pyonnuka
7
9
  class Application
data/pyonnuka.gemspec CHANGED
@@ -24,4 +24,5 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency "rspec"
25
25
  spec.add_development_dependency "activesupport"
26
26
  spec.add_development_dependency "slim"
27
+ spec.add_development_dependency "rack"
27
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pyonnuka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - masaki_nukaga
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rack
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  description: Ruby on Pyonnuka is a simple web application framework.
84
98
  email:
85
99
  - masaki.nukaga1209@gmail.com
@@ -103,6 +117,7 @@ files:
103
117
  - bin/setup
104
118
  - lib/pyonnuka.rb
105
119
  - lib/pyonnuka/app/app_generator.rb
120
+ - lib/pyonnuka/app/application.rb
106
121
  - lib/pyonnuka/commands/command_task.rb
107
122
  - lib/pyonnuka/helpers/commands.rb
108
123
  - lib/pyonnuka/templates/Gemfile