easy_portfolio 0.0.3 → 0.0.4

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
  SHA256:
3
- metadata.gz: 97ed2ac1929ccc779d77bd5aaab524b0ce12b9bbb36d257ab704bb3d9ab39acb
4
- data.tar.gz: 7c2264f676b6b3ff922dd6a82c0b39b985a6fe9ae1f411af1a699cf393593515
3
+ metadata.gz: c384f9660f84ab5d5ab7104c633bb7a364b40b94e0fe7903c6c23953553c3c31
4
+ data.tar.gz: 999e76214ff78827e85f126d8aa191406a7a11f64be1a165422659a13bf38289
5
5
  SHA512:
6
- metadata.gz: 4759849e1fcd1a0d0fd5f490453c50b0ab0b63ee79dfb12f20d66fb3d0944ee1d22cbdc8aeb89e7e2264cf02750123242513ee42b79449c81f0b4ba7455ed386
7
- data.tar.gz: '03772008a49f7678a300604a29b58ed228632eab48a85fe2ab26530cbd45b8d66750d9536089d43af8e1b34a370d0e1fa5a4b062eef4b504fdd1997706de6c93'
6
+ metadata.gz: 5058ebbc835c1b697369d2f263a00b0df6e80089e016bb2329835afe9671092c369c12c41ee495d828b271316a055afdfd5e9c27ae49337cc5d73e84b82e64da
7
+ data.tar.gz: 9ddd8c6293324cd43551fb4858ff7efefc18a40fc5691e8aefb5568a9a136c89d60dfc9ccbc4e175c606dc93ca15dffbd5816cff09e4dbe94e54e27fc79e6bed
@@ -0,0 +1,31 @@
1
+ # EasyPortfolio
2
+
3
+ Are you a developer with an outstanding understanding of server-side programming? If so, would you rather not do any front-end programming? Furthermore, are you on the job hunt and need a fresh, professional portfolio website to show off your programming skills?
4
+
5
+ If you meet any or all of those requirements, you may be in luck.
6
+
7
+ With **EasyPortfolio**, you can have a working portfolio for your *Ruby* projects and Resume up in minutes. I took care of the front-end work; the CSS is all mobile-first, with media queries that make viewing on any device possible.
8
+
9
+ Here is the link to the RubyGems page: [EasyPortfolio](https://rubygems.org/gems/easy_portfolio)
10
+
11
+ ## How To Use
12
+
13
+ Simply install the gem with the command `gem install easy_portfolio` and run the command `easy` from the directory where you would like your project to be stored.
14
+
15
+ Upon opening the HTML and CSS you will see that it comes with all of the layouts and styles needed. The Sinatra files are also all set up so if you want to write some Ruby code into your routes you have that flexibility. As it stands now there is no Ruby code in the HTML or CSS.
16
+
17
+ To test your site, just run `bundle exec ruby app.rb` from the root of the project directory.
18
+
19
+ Of course, feel free to personalize the CSS as much as you'd like.
20
+
21
+ The things you will need to add to the site are:
22
+ 1. Your picture
23
+ 2. Pictures of two of your projects
24
+ 3. Resume and personal information
25
+ 4. Links to your Github, Linkedin, and email address.
26
+
27
+ ## Further Information
28
+
29
+ If you are having trouble installing or using the gem, send me an email at `jordanmoore753@gmail.com`. For any issues or errors encountered while using the gem you can email the same address.
30
+
31
+ Thank you for your time and have a great day!
@@ -0,0 +1,17 @@
1
+ require 'rake/testtask'
2
+ require_relative 'lib/easy_portfolio.rb'
3
+
4
+ Rake::TestTask.new do |t|
5
+ t.libs << 'test'
6
+ end
7
+
8
+ desc "Run tests"
9
+ task :default => :test
10
+
11
+ desc "increment version, build and install gem"
12
+ task :build_install do
13
+ Version.increment
14
+ current_version = Version.return_current_version_string
15
+ sh "gem build easy_portfolio.gemspec"
16
+ sh "gem install easy_portfolio-#{current_version}.gem"
17
+ end
Binary file
@@ -0,0 +1,17 @@
1
+ require_relative "lib/easy_portfolio.rb"
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = 'easy_portfolio'
5
+ s.version = Version.return_current_version_string
6
+ s.executables << 'easy'
7
+ s.date = '2019-09-19'
8
+ s.summary = "This gem creates the boilerplate files for a portfolio in Sinatra."
9
+ s.description = "A portfolio-generator in Sinatra"
10
+ s.authors = ["Jordan Moore"]
11
+ s.email = 'jordanmoore753@gmail.com'
12
+ s.files = Dir['lib/**/*', 'test/*', '*']
13
+ s.homepage =
14
+ 'https://github.com/jordanmoore753/EasyPortfolio'
15
+ s.license = 'MIT'
16
+ s.required_ruby_version = '>= 2.5.0'
17
+ end
@@ -0,0 +1,145 @@
1
+ require 'minitest/autorun'
2
+ require 'fileutils'
3
+ require 'easy_portfolio'
4
+
5
+ class EasyPortfolioTest < Minitest::Test
6
+ def remove_project_template
7
+ FileUtils.rm_r 'easy_portfolio_template'
8
+ end
9
+
10
+ # Input Class
11
+
12
+ def test_ask_yes_or_no_affirmative
13
+ $stdin = StringIO.new('y')
14
+ assert_equal 'y', Input.new.send(:ask_yes_or_no)
15
+ end
16
+
17
+ def test_ask_yes_or_no_negative
18
+ $stdin = StringIO.new('n')
19
+ assert_equal 'n', Input.new.send(:ask_yes_or_no)
20
+ end
21
+
22
+ def test_action_verified?
23
+ action_is_no = Input.new.send(:action_verified?, "n")
24
+ action_is_yes = Input.new.send(:action_verified?, "y")
25
+
26
+ assert_equal true, action_is_yes
27
+ assert_equal false, action_is_no
28
+ end
29
+
30
+ # EasyPortfolio Class and FileAction Module
31
+
32
+ def test_portfolio_dir_created
33
+ EasyPortfolio.create_template_directory
34
+
35
+ assert_includes Dir.children(Dir.pwd), "easy_portfolio_template"
36
+ assert_includes Dir.children(Dir.pwd + "/easy_portfolio_template"), "views"
37
+
38
+ remove_project_template
39
+ end
40
+
41
+ def test_template_already_exists_in_dir
42
+ EasyPortfolio.create_template_directory
43
+
44
+ bool = EasyPortfolio.template_already_exists?
45
+
46
+ assert_equal bool, true
47
+
48
+ remove_project_template
49
+
50
+ bool = EasyPortfolio.template_already_exists?
51
+
52
+ assert_equal bool, false
53
+ end
54
+
55
+ def test_git_bundler_actions_completed
56
+ EasyPortfolio.create_template_directory
57
+
58
+ assert_includes Dir.children(Dir.pwd), "easy_portfolio_template"
59
+ assert_includes Dir.children(Dir.pwd + "/easy_portfolio_template"), "views"
60
+
61
+ EasyPortfolio.perform_git_and_bundler_actions
62
+
63
+ assert_includes Dir.children(Dir.pwd + "/easy_portfolio_template"), ".git"
64
+ assert_includes Dir.children(Dir.pwd + "/easy_portfolio_template"), "Gemfile.lock"
65
+
66
+ remove_project_template
67
+ end
68
+
69
+ def test_execute_affirmative
70
+ $stdin = StringIO.new('y')
71
+ EasyPortfolio.send(:execute)
72
+
73
+ assert_includes Dir.children(Dir.pwd + "/easy_portfolio_template"), ".git"
74
+ assert_includes Dir.children(Dir.pwd + "/easy_portfolio_template"), "Gemfile.lock"
75
+
76
+ remove_project_template
77
+ end
78
+
79
+ def test_execute_negative
80
+ $stdin = StringIO.new('n')
81
+ EasyPortfolio.send(:execute)
82
+
83
+ refute_includes Dir.children(Dir.pwd), "easy_portfolio_template"
84
+ end
85
+
86
+ def test_portfolio_all_views_included
87
+ EasyPortfolio.create_template_directory
88
+
89
+ assert_includes Dir.children(Dir.pwd + "/easy_portfolio_template/views/"), "layout.erb"
90
+ assert_includes Dir.children(Dir.pwd + "/easy_portfolio_template/views/"), "portfolio.erb"
91
+
92
+ remove_project_template
93
+ end
94
+
95
+ def test_portfolio_all_tests_included
96
+ EasyPortfolio.create_template_directory
97
+
98
+ assert_includes Dir.children(Dir.pwd + "/easy_portfolio_template/test/"), "app_test.rb"
99
+
100
+ remove_project_template
101
+ end
102
+
103
+ def test_portfolio_all_stylesheets_included
104
+ EasyPortfolio.create_template_directory
105
+
106
+ assert_includes Dir.children(Dir.pwd + "/easy_portfolio_template/public/stylesheets/"), "style.css"
107
+
108
+ remove_project_template
109
+ end
110
+
111
+ def test_portfolio_all_root_files_included
112
+ EasyPortfolio.create_template_directory
113
+
114
+ assert_includes Dir.children(Dir.pwd + "/easy_portfolio_template/"), "app.rb"
115
+ assert_includes Dir.children(Dir.pwd + "/easy_portfolio_template/"), "Gemfile"
116
+ assert_includes Dir.children(Dir.pwd + "/easy_portfolio_template/"), "config.ru"
117
+ assert_includes Dir.children(Dir.pwd + "/easy_portfolio_template/"), "Procfile"
118
+
119
+ remove_project_template
120
+ end
121
+
122
+ # Version Class
123
+
124
+ def test_version_number_increment
125
+ start_version = Version.return_current_version
126
+ only_numbers = start_version.map(&:to_i)
127
+
128
+ Version.increment
129
+
130
+ incremented_version = Version.return_current_version
131
+ inc_only_numbers = incremented_version.map(&:to_i)
132
+
133
+ if only_numbers[1] == 9 && only_numbers[2] == 9
134
+ assert_equal only_numbers[0] + 1, inc_only_numbers[0]
135
+ elsif only_numbers[2] == 9
136
+ assert_equal only_numbers[1] + 1, inc_only_numbers[1]
137
+ else
138
+ assert_equal only_numbers[2] + 1, inc_only_numbers[2]
139
+ end
140
+
141
+ Version.replace_version_number(only_numbers.join('.'))
142
+
143
+ assert_equal start_version, Version.return_current_version
144
+ end
145
+ end
@@ -0,0 +1 @@
1
+ 0.0.4
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_portfolio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Moore
@@ -17,7 +17,11 @@ executables:
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
+ - README.md
21
+ - Rakefile
20
22
  - bin/easy
23
+ - easy_portfolio-0.0.3.gem
24
+ - easy_portfolio.gemspec
21
25
  - lib/easy_portfolio.rb
22
26
  - lib/easy_portfolio/create.rb
23
27
  - lib/easy_portfolio/input.rb
@@ -32,6 +36,8 @@ files:
32
36
  - lib/easy_portfolio/portfolio_template/views/layout.erb
33
37
  - lib/easy_portfolio/portfolio_template/views/portfolio.erb
34
38
  - lib/easy_portfolio/version.rb
39
+ - test/test_easy_portfolio.rb
40
+ - version_number.txt
35
41
  homepage: https://github.com/jordanmoore753/EasyPortfolio
36
42
  licenses:
37
43
  - MIT