target_weight 0.0.5
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/.gitignore +17 -0
- data/.idea/dictionaries/Mick.xml +3 -0
- data/.idea/encodings.xml +5 -0
- data/.idea/misc.xml +42 -0
- data/.idea/modules.xml +9 -0
- data/.idea/scopes/scope_settings.xml +5 -0
- data/.idea/target_weight.iml +10 -0
- data/.idea/vcs.xml +7 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/lib/target_weight/version.rb +3 -0
- data/lib/target_weight.rb +47 -0
- data/target_weight.gemspec +19 -0
- metadata +60 -0
data/.gitignore
ADDED
data/.idea/encodings.xml
ADDED
data/.idea/misc.xml
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ProjectInspectionProfilesVisibleTreeState">
|
4
|
+
<entry key="Project Default">
|
5
|
+
<profile-state>
|
6
|
+
<expanded-state>
|
7
|
+
<State>
|
8
|
+
<id />
|
9
|
+
</State>
|
10
|
+
</expanded-state>
|
11
|
+
<selected-state>
|
12
|
+
<State>
|
13
|
+
<id>CSS</id>
|
14
|
+
</State>
|
15
|
+
</selected-state>
|
16
|
+
</profile-state>
|
17
|
+
</entry>
|
18
|
+
</component>
|
19
|
+
<component name="ProjectResources">
|
20
|
+
<default-html-doctype>$APPLICATION_HOME_DIR$/lib/rubymine.jar!/resources/html5-schema/html5.rnc</default-html-doctype>
|
21
|
+
</component>
|
22
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-1.9.3-p125" project-jdk-type="RUBY_SDK" />
|
23
|
+
<component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false">
|
24
|
+
<option name="USER" value="" />
|
25
|
+
<option name="PASSWORD" value="" />
|
26
|
+
<option name="mySSHConnectionTimeout" value="30000" />
|
27
|
+
<option name="mySSHReadTimeout" value="30000" />
|
28
|
+
<option name="LAST_MERGED_REVISION" />
|
29
|
+
<option name="MERGE_DRY_RUN" value="false" />
|
30
|
+
<option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
|
31
|
+
<option name="UPDATE_LOCK_ON_DEMAND" value="false" />
|
32
|
+
<option name="IGNORE_SPACES_IN_MERGE" value="false" />
|
33
|
+
<option name="DETECT_NESTED_COPIES" value="true" />
|
34
|
+
<option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
|
35
|
+
<option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
|
36
|
+
<option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
|
37
|
+
<option name="FORCE_UPDATE" value="false" />
|
38
|
+
<option name="IGNORE_EXTERNALS" value="false" />
|
39
|
+
<myIsUseDefaultProxy>false</myIsUseDefaultProxy>
|
40
|
+
</component>
|
41
|
+
</project>
|
42
|
+
|
data/.idea/modules.xml
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ProjectModuleManager">
|
4
|
+
<modules>
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/target_weight.iml" filepath="$PROJECT_DIR$/.idea/target_weight.iml" />
|
6
|
+
</modules>
|
7
|
+
</component>
|
8
|
+
</project>
|
9
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="NewModuleRootManager">
|
4
|
+
<content url="file://$MODULE_DIR$" />
|
5
|
+
<orderEntry type="inheritedJdk" />
|
6
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
7
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.1.3, RVM: ruby-1.9.3-p125) [gem]" level="application" />
|
8
|
+
</component>
|
9
|
+
</module>
|
10
|
+
|
data/.idea/vcs.xml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Mick Soum
|
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,29 @@
|
|
1
|
+
# TargetWeight
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'target_weight'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install target_weight
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require "target_weight/version"
|
2
|
+
|
3
|
+
class TargetWeight
|
4
|
+
#class CalcWeight
|
5
|
+
# Base height for both sex is 5ft == 60inches
|
6
|
+
|
7
|
+
#Target Weight Formula for Male
|
8
|
+
# 110.23lbs + 5.07058lbs * additional inches above base of 60 inches (5ft)
|
9
|
+
|
10
|
+
#Target Weight Formula for Female
|
11
|
+
# 100.31lbs + 5.07058lbs * additional inches above base of 60 inches (5ft)
|
12
|
+
|
13
|
+
attr_accessor :name, :height, :weight, :sex
|
14
|
+
|
15
|
+
def name
|
16
|
+
puts = "Please enter your name"
|
17
|
+
@name = gets.chomp
|
18
|
+
end
|
19
|
+
|
20
|
+
def height
|
21
|
+
puts = "Please enter your height in inches (i.e. 5ft = 60inches)"
|
22
|
+
@height = gets.chomp
|
23
|
+
end
|
24
|
+
|
25
|
+
def weight
|
26
|
+
puts = "Please enter your weight in lbs with out symbol (i.e. 150, 160)"
|
27
|
+
@weight = gets.chomp
|
28
|
+
end
|
29
|
+
|
30
|
+
def sex
|
31
|
+
puts = "Please enter your sex (M/F)"
|
32
|
+
@sex = gets.chomp
|
33
|
+
end
|
34
|
+
|
35
|
+
|
36
|
+
def user_weight()
|
37
|
+
if sex == "M"
|
38
|
+
target = 110.23 +(5.0705 *((@height.to_i) - 60))
|
39
|
+
puts "Your weight is #{@weight.to_i - target}lbs from your target of #{target}lbs"
|
40
|
+
else
|
41
|
+
target = 100.31 +(5.0705 *((@height.to_i) - 60))
|
42
|
+
puts "Your weight is #{@weight.to_i - target}lbs from your target of #{target}lbs"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
#end
|
47
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'target_weight/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "target_weight"
|
8
|
+
gem.version = TargetWeight::VERSION
|
9
|
+
gem.authors = ["Santy Soum"]
|
10
|
+
gem.email = ["mick26soum@gmail.com"]
|
11
|
+
gem.description = %q{Enter height, weight, sex to calculate IBW}
|
12
|
+
gem.summary = %q{Target Weight Calculator}
|
13
|
+
gem.homepage = ""
|
14
|
+
|
15
|
+
gem.files = `git ls-files`.split($/)
|
16
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
|
+
gem.require_paths = ["lib"]
|
19
|
+
end
|
metadata
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: target_weight
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.5
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Santy Soum
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-12-11 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: Enter height, weight, sex to calculate IBW
|
15
|
+
email:
|
16
|
+
- mick26soum@gmail.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- .gitignore
|
22
|
+
- .idea/dictionaries/Mick.xml
|
23
|
+
- .idea/encodings.xml
|
24
|
+
- .idea/misc.xml
|
25
|
+
- .idea/modules.xml
|
26
|
+
- .idea/scopes/scope_settings.xml
|
27
|
+
- .idea/target_weight.iml
|
28
|
+
- .idea/vcs.xml
|
29
|
+
- Gemfile
|
30
|
+
- LICENSE.txt
|
31
|
+
- README.md
|
32
|
+
- Rakefile
|
33
|
+
- lib/target_weight.rb
|
34
|
+
- lib/target_weight/version.rb
|
35
|
+
- target_weight.gemspec
|
36
|
+
homepage: ''
|
37
|
+
licenses: []
|
38
|
+
post_install_message:
|
39
|
+
rdoc_options: []
|
40
|
+
require_paths:
|
41
|
+
- lib
|
42
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
requirements: []
|
55
|
+
rubyforge_project:
|
56
|
+
rubygems_version: 1.8.22
|
57
|
+
signing_key:
|
58
|
+
specification_version: 3
|
59
|
+
summary: Target Weight Calculator
|
60
|
+
test_files: []
|