yunoe 0.0.1

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.
data/.gemtest ADDED
File without changes
data/History.txt ADDED
@@ -0,0 +1,4 @@
1
+ === 0.0.1 2012-09-20
2
+
3
+ * 1 major enhancement:
4
+ * Initial release
data/Manifest.txt ADDED
@@ -0,0 +1,16 @@
1
+ History.txt
2
+ Manifest.txt
3
+ PostInstall.txt
4
+ README.rdoc
5
+ Rakefile
6
+ lib/yunoe.rb
7
+ lib/yunoe/yunoe.rb
8
+ lib/dark/cli.rb
9
+ bin/dark
10
+ script/console
11
+ script/destroy
12
+ script/generate
13
+ spec/spec.opts
14
+ spec/spec_helper.rb
15
+ spec/yunoe_spec.rb
16
+ tasks/rspec.rake
data/PostInstall.txt ADDED
@@ -0,0 +1,7 @@
1
+
2
+ For more information on yunoe, see http://yunoe.rubyforge.org
3
+
4
+ NOTE: Change this information in PostInstall.txt
5
+ You can also delete it if you don't want it.
6
+
7
+
data/README.rdoc ADDED
@@ -0,0 +1,48 @@
1
+ = yunoe
2
+
3
+ * http://github.com/#{github_username}/#{project_name}
4
+
5
+ == DESCRIPTION:
6
+
7
+ FIX (describe your package)
8
+
9
+ == FEATURES/PROBLEMS:
10
+
11
+ * FIX (list of features or problems)
12
+
13
+ == SYNOPSIS:
14
+
15
+ FIX (code sample of usage)
16
+
17
+ == REQUIREMENTS:
18
+
19
+ * FIX (list of requirements)
20
+
21
+ == INSTALL:
22
+
23
+ * FIX (sudo gem install, anything else)
24
+
25
+ == LICENSE:
26
+
27
+ (The MIT License)
28
+
29
+ Copyright (c) 2012 Kazuki Yunoue
30
+
31
+ Permission is hereby granted, free of charge, to any person obtaining
32
+ a copy of this software and associated documentation files (the
33
+ 'Software'), to deal in the Software without restriction, including
34
+ without limitation the rights to use, copy, modify, merge, publish,
35
+ distribute, sublicense, and/or sell copies of the Software, and to
36
+ permit persons to whom the Software is furnished to do so, subject to
37
+ the following conditions:
38
+
39
+ The above copyright notice and this permission notice shall be
40
+ included in all copies or substantial portions of the Software.
41
+
42
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
43
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
44
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
45
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
46
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
47
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
48
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,26 @@
1
+ require 'rubygems'
2
+ gem 'hoe', '>= 2.1.0'
3
+ require 'hoe'
4
+ require 'fileutils'
5
+ require './lib/yunoe'
6
+
7
+ Hoe.plugin :newgem
8
+ # Hoe.plugin :website
9
+ # Hoe.plugin :cucumberfeatures
10
+
11
+ # Generate all the Rake tasks
12
+ # Run 'rake -T' to see list of generated tasks (from gem root directory)
13
+ $hoe = Hoe.spec 'yunoe' do
14
+ self.developer 'Kazuki Yunoue', 'you.know.ue1480@gmail.com'
15
+ self.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
16
+ self.rubyforge_name = self.name # TODO this is default value
17
+ # self.extra_deps = [['activesupport','>= 2.0.2']]
18
+
19
+ end
20
+
21
+ require 'newgem/tasks'
22
+ Dir['tasks/**/*.rake'].each { |t| load t }
23
+
24
+ # TODO - want other tests/tasks run by default? Add them to the list
25
+ # remove_task :default
26
+ # task :default => [:spec, :features]
data/bin/dark ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # Created on 2012-9-20.
4
+ # Copyright (c) 2012. All rights reserved.
5
+
6
+ require 'rubygems'
7
+ require File.expand_path(File.dirname(__FILE__) + "/../lib/yunoe")
8
+ require "dark/cli"
9
+
10
+ Dark::CLI.execute(STDOUT, ARGV)
data/lib/dark/cli.rb ADDED
@@ -0,0 +1,41 @@
1
+ require 'optparse'
2
+
3
+ module Dark
4
+ class CLI
5
+ def self.execute(stdout, arguments=[])
6
+
7
+ # NOTE: the option -p/--path= is given as an example, and should be replaced in your application.
8
+
9
+ options = {
10
+ :path => '~'
11
+ }
12
+ mandatory_options = %w( )
13
+
14
+ parser = OptionParser.new do |opts|
15
+ opts.banner = <<-BANNER.gsub(/^ /,'')
16
+ This application is wonderful because...
17
+
18
+ Usage: #{File.basename($0)} [options]
19
+
20
+ Options are:
21
+ BANNER
22
+ opts.separator ""
23
+ opts.on("-p", "--path PATH", String,
24
+ "This is a sample message.",
25
+ "For multiple lines, add more strings.",
26
+ "Default: ~") { |arg| options[:path] = arg }
27
+ opts.on("-h", "--help",
28
+ "Show this help message.") { stdout.puts opts; exit }
29
+ opts.parse!(arguments)
30
+
31
+ if mandatory_options && mandatory_options.find { |option| options[option.to_sym].nil? }
32
+ stdout.puts opts; exit
33
+ end
34
+ end
35
+
36
+ path = options[:path]
37
+
38
+ stdout.puts Yunoe::Yunoe.new.dark
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,31 @@
1
+ module Yunoe
2
+ class Yunoe
3
+ def dark
4
+ res = ""
5
+ case Time.now.to_i%10
6
+ when 0
7
+ res = "0"
8
+ when 1
9
+ res = "1"
10
+ when 2
11
+ res = "2"
12
+ when 3
13
+ res = "3"
14
+ when 4
15
+ res = "4"
16
+ when 5
17
+ res = "5"
18
+ when 6
19
+ res = "6"
20
+ when 7
21
+ res = "7"
22
+ when 8
23
+ res = "8"
24
+ when 9
25
+ res = "9"
26
+ end
27
+
28
+ return res
29
+ end
30
+ end
31
+ end
data/lib/yunoe.rb ADDED
@@ -0,0 +1,8 @@
1
+ $:.unshift(File.dirname(__FILE__)) unless
2
+ $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
+
4
+ require 'yunoe/yunoe'
5
+
6
+ module Yunoe
7
+ VERSION = '0.0.1'
8
+ end
data/script/console ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+ # File: script/console
3
+ irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
4
+
5
+ libs = " -r irb/completion"
6
+ # Perhaps use a console_lib to store any extra methods I may want available in the cosole
7
+ # libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
8
+ libs << " -r #{File.dirname(__FILE__) + '/../lib/yunoe.rb'}"
9
+ puts "Loading yunoe gem"
10
+ exec "#{irb} #{libs} --simple-prompt"
data/script/destroy ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
3
+
4
+ begin
5
+ require 'rubigen'
6
+ rescue LoadError
7
+ require 'rubygems'
8
+ require 'rubigen'
9
+ end
10
+ require 'rubigen/scripts/destroy'
11
+
12
+ ARGV.shift if ['--help', '-h'].include?(ARGV[0])
13
+ RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
14
+ RubiGen::Scripts::Destroy.new.run(ARGV)
data/script/generate ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
3
+
4
+ begin
5
+ require 'rubigen'
6
+ rescue LoadError
7
+ require 'rubygems'
8
+ require 'rubigen'
9
+ end
10
+ require 'rubigen/scripts/generate'
11
+
12
+ ARGV.shift if ['--help', '-h'].include?(ARGV[0])
13
+ RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
14
+ RubiGen::Scripts::Generate.new.run(ARGV)
data/spec/spec.opts ADDED
@@ -0,0 +1 @@
1
+ --colour
@@ -0,0 +1,10 @@
1
+ begin
2
+ require 'rspec'
3
+ rescue LoadError
4
+ require 'rubygems' unless ENV['NO_RUBYGEMS']
5
+ gem 'rspec'
6
+ require 'rspec'
7
+ end
8
+
9
+ $:.unshift(File.dirname(__FILE__) + '/../lib')
10
+ require 'yunoe'
@@ -0,0 +1,11 @@
1
+ require File.dirname(__FILE__) + '/spec_helper.rb'
2
+
3
+ # Time to add your specs!
4
+ # http://rspec.info/
5
+ describe "Place your specs here" do
6
+
7
+ it "find this spec in spec directory" do
8
+ # violated "Be sure to write your specs"
9
+ end
10
+
11
+ end
data/tasks/rspec.rake ADDED
@@ -0,0 +1,24 @@
1
+ begin
2
+ require 'rspec'
3
+ rescue LoadError
4
+ require 'rubygems' unless ENV['NO_RUBYGEMS']
5
+ require 'rspec'
6
+ end
7
+ begin
8
+ require 'rspec/core/rake_task'
9
+ rescue LoadError
10
+ puts <<-EOS
11
+ To use rspec for testing you must install rspec gem:
12
+ gem install rspec
13
+ EOS
14
+ exit(0)
15
+ end
16
+
17
+ desc "Run the specs under spec/models"
18
+ #Spec::Rake::SpecTask.new do |t|
19
+ # t.spec_opts = ['--options', "spec/spec.opts"]
20
+ # t.spec_files = FileList['spec/**/*_spec.rb']
21
+ #end
22
+ RSpec::Core::RakeTask.new(:spec) do |t|
23
+ t.rspec_opts = ['--options=' "spec/spec.opts"]
24
+ end
metadata ADDED
@@ -0,0 +1,102 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: yunoe
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Kazuki Yunoue
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-09-21 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rdoc
16
+ requirement: &13524580 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '3.10'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *13524580
25
+ - !ruby/object:Gem::Dependency
26
+ name: newgem
27
+ requirement: &13523960 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: 1.5.3
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *13523960
36
+ - !ruby/object:Gem::Dependency
37
+ name: hoe
38
+ requirement: &13523300 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: '3.0'
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *13523300
47
+ description: FIX (describe your package)
48
+ email:
49
+ - you.know.ue1480@gmail.com
50
+ executables:
51
+ - dark
52
+ extensions: []
53
+ extra_rdoc_files:
54
+ - History.txt
55
+ - Manifest.txt
56
+ - PostInstall.txt
57
+ - README.rdoc
58
+ files:
59
+ - History.txt
60
+ - Manifest.txt
61
+ - PostInstall.txt
62
+ - README.rdoc
63
+ - Rakefile
64
+ - lib/yunoe.rb
65
+ - lib/yunoe/yunoe.rb
66
+ - lib/dark/cli.rb
67
+ - bin/dark
68
+ - script/console
69
+ - script/destroy
70
+ - script/generate
71
+ - spec/spec.opts
72
+ - spec/spec_helper.rb
73
+ - spec/yunoe_spec.rb
74
+ - tasks/rspec.rake
75
+ - .gemtest
76
+ homepage: http://github.com/#{github_username}/#{project_name}
77
+ licenses: []
78
+ post_install_message: PostInstall.txt
79
+ rdoc_options:
80
+ - --main
81
+ - README.rdoc
82
+ require_paths:
83
+ - lib
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ none: false
86
+ requirements:
87
+ - - ! '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ required_rubygems_version: !ruby/object:Gem::Requirement
91
+ none: false
92
+ requirements:
93
+ - - ! '>='
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ requirements: []
97
+ rubyforge_project: yunoe
98
+ rubygems_version: 1.8.15
99
+ signing_key:
100
+ specification_version: 3
101
+ summary: FIX (describe your package)
102
+ test_files: []