ronsplaining 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2d21dbe39e0c8c8a979adfdec2bffb14a35a5fb5
4
+ data.tar.gz: 2e50e9e80a0622b0c36c98b48b2a25152bc21922
5
+ SHA512:
6
+ metadata.gz: 3ddfc9bc7d14f3b607c3cfe17dc0f528278895bdb5902ad1aa8f746eaa5505efed950d458ffc950acd282ed60d7df36c1d10aa47ce56b487224596056f296bb7
7
+ data.tar.gz: 8446c1b5e1d846b65d009a4a63b278022c2d2825ca5a750c3d7fe7fa1136c4762a2507c0b91f0c2b79853ec580c56b3e09a1402ae8aaf251713491f4ca8d4009
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in ronsplaining.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Xuan Yue
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # Ronsplaining
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'ronsplaining'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install ronsplaining
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Contributing
26
+
27
+ 1. Fork it ( https://github.com/[my-github-username]/ronsplaining/fork )
28
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
29
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
30
+ 4. Push to the branch (`git push origin my-new-feature`)
31
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,14 @@
1
+
2
+ #!/usr/bin/env ruby
3
+
4
+ require 'sinatra'
5
+ require 'ronsplaining/time_keeper'
6
+
7
+ # otherwise sinatra won't always automagically launch its embedded
8
+ # http server when this script is executed
9
+ set :run, true
10
+
11
+ get '/' do
12
+ time_keeper = Ronsplaining::TimeKeeper.new
13
+ return time_keeper.verbose_time
14
+ end
@@ -0,0 +1,14 @@
1
+ require "ronsplaining/version"
2
+
3
+ module Ronsplaining
4
+ class TimeKeeper
5
+ def verbose_time
6
+ time = Time.now
7
+ minute = time.min
8
+ hour = time.hour % 12
9
+ meridian_indicator = time.hour < 12 ? 'AM' : 'PM'
10
+
11
+ "#{minute} minutes past #{hour} o'clock, #{meridian_indicator}"
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require "ronsplaining/version"
2
+
3
+ module Ronsplaining
4
+ class TimeKeeper
5
+ def verbose_time
6
+ time = Time.now
7
+ minute = time.min
8
+ hour = time.hour % 12
9
+ meridian_indicator = time.hour < 12 ? 'AM' : 'PM'
10
+
11
+ "#{minute} minutes past #{hour} o'clock, #{meridian_indicator}"
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,3 @@
1
+ module Ronsplaining
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'ronsplaining/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "ronsplaining"
8
+ spec.version = "0.0.1"
9
+ spec.authors = ["Xuan Yue"]
10
+ spec.email = ["mintedfreshly@gmail.com"]
11
+ spec.summary = %q{"gem demo for Ron's class"}
12
+ spec.description = %q{"gem demo for Ron's class"}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ # spec.executables << 'ronsplaining_server'
19
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
+ spec.require_paths = ["lib"]
21
+ # spec.require_paths = ["bin"]
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.7"
24
+ spec.add_development_dependency "rake", "~> 10.0"
25
+ spec.add_dependency "sinatra"
26
+ end
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ronsplaining
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Xuan Yue
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-04-23 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.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
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: sinatra
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: '"gem demo for Ron''s class"'
56
+ email:
57
+ - mintedfreshly@gmail.com
58
+ executables:
59
+ - ronsplaining_server.rb
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - ".gitignore"
64
+ - Gemfile
65
+ - LICENSE.txt
66
+ - README.md
67
+ - Rakefile
68
+ - bin/ronsplaining_server.rb
69
+ - lib/ronsplaining.rb
70
+ - lib/ronsplaining/time_keeper.rb
71
+ - lib/ronsplaining/version.rb
72
+ - ronsplaining.gemspec
73
+ homepage: ''
74
+ licenses:
75
+ - MIT
76
+ metadata: {}
77
+ post_install_message:
78
+ rdoc_options: []
79
+ require_paths:
80
+ - lib
81
+ required_ruby_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ requirements: []
92
+ rubyforge_project:
93
+ rubygems_version: 2.4.3
94
+ signing_key:
95
+ specification_version: 4
96
+ summary: '"gem demo for Ron''s class"'
97
+ test_files: []