Skip to content

Commit 9c79369

Browse files
committed
Switched from Sinatra to rails
1 parent 2eb872f commit 9c79369

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+55
-1146
lines changed

Gemfile

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,4 @@
11
source 'https://rubygems.org'
2+
gem 'sinatra'
23

3-
4-
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
5-
gem 'rails', '4.2.1'
6-
# Use postgresql as the database for Active Record
7-
gem 'pg'
8-
# Use SCSS for stylesheets
9-
gem 'sass-rails', '~> 5.0'
10-
# Use Uglifier as compressor for JavaScript assets
11-
gem 'uglifier', '>= 1.3.0'
12-
# Use CoffeeScript for .coffee assets and views
13-
gem 'coffee-rails', '~> 4.1.0'
14-
# See https://github.com/rails/execjs#readme for more supported runtimes
15-
# gem 'therubyracer', platforms: :ruby
16-
17-
# Use jquery as the JavaScript library
18-
gem 'jquery-rails'
19-
20-
# For generating the svg
214
gem 'githubchart'
22-
23-
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
24-
gem 'turbolinks'
25-
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
26-
gem 'jbuilder', '~> 2.0'
27-
# bundle exec rake doc:rails generates the API under doc/api.
28-
gem 'sdoc', '~> 0.4.0', group: :doc
29-
30-
# Use ActiveModel has_secure_password
31-
# gem 'bcrypt', '~> 3.1.7'
32-
33-
# Use Unicorn as the app server
34-
# gem 'unicorn'
35-
36-
# Use Capistrano for deployment
37-
# gem 'capistrano-rails', group: :development
38-
39-
group :development, :test do
40-
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
41-
gem 'byebug'
42-
43-
# Access an IRB console on exception pages or by using <%= console %> in views
44-
gem 'web-console', '~> 2.0'
45-
46-
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
47-
gem 'spring'
48-
end
49-

Gemfile.lock

Lines changed: 7 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -1,167 +1,20 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actionmailer (4.2.1)
5-
actionpack (= 4.2.1)
6-
actionview (= 4.2.1)
7-
activejob (= 4.2.1)
8-
mail (~> 2.5, >= 2.5.4)
9-
rails-dom-testing (~> 1.0, >= 1.0.5)
10-
actionpack (4.2.1)
11-
actionview (= 4.2.1)
12-
activesupport (= 4.2.1)
13-
rack (~> 1.6)
14-
rack-test (~> 0.6.2)
15-
rails-dom-testing (~> 1.0, >= 1.0.5)
16-
rails-html-sanitizer (~> 1.0, >= 1.0.1)
17-
actionview (4.2.1)
18-
activesupport (= 4.2.1)
19-
builder (~> 3.1)
20-
erubis (~> 2.7.0)
21-
rails-dom-testing (~> 1.0, >= 1.0.5)
22-
rails-html-sanitizer (~> 1.0, >= 1.0.1)
23-
activejob (4.2.1)
24-
activesupport (= 4.2.1)
25-
globalid (>= 0.3.0)
26-
activemodel (4.2.1)
27-
activesupport (= 4.2.1)
28-
builder (~> 3.1)
29-
activerecord (4.2.1)
30-
activemodel (= 4.2.1)
31-
activesupport (= 4.2.1)
32-
arel (~> 6.0)
33-
activesupport (4.2.1)
34-
i18n (~> 0.7)
35-
json (~> 1.7, >= 1.7.7)
36-
minitest (~> 5.1)
37-
thread_safe (~> 0.3, >= 0.3.4)
38-
tzinfo (~> 1.1)
39-
arel (6.0.3)
40-
basiccache (1.0.0)
41-
binding_of_caller (0.7.2)
42-
debug_inspector (>= 0.0.1)
43-
builder (3.2.2)
44-
byebug (6.0.2)
45-
coffee-rails (4.1.0)
46-
coffee-script (>= 2.2.0)
47-
railties (>= 4.0.0, < 5.0)
48-
coffee-script (2.4.1)
49-
coffee-script-source
50-
execjs
51-
coffee-script-source (1.9.1.1)
52-
curb (0.8.8)
53-
debug_inspector (0.0.2)
54-
erubis (2.7.0)
55-
execjs (2.6.0)
56-
githubchart (1.0.1)
57-
githubstats (~> 1.1.0)
58-
svgplot (~> 0.2.0)
59-
githubstats (1.1.0)
60-
basiccache (~> 1.0.0)
61-
curb (~> 0.8.6)
62-
nokogiri (~> 1.6.5)
63-
globalid (0.3.6)
64-
activesupport (>= 4.1.0)
65-
i18n (0.7.0)
66-
jbuilder (2.3.2)
67-
activesupport (>= 3.0.0, < 5)
68-
multi_json (~> 1.2)
69-
jquery-rails (4.0.5)
70-
rails-dom-testing (~> 1.0)
71-
railties (>= 4.2.0)
72-
thor (>= 0.14, < 2.0)
73-
json (1.8.3)
74-
loofah (2.0.3)
75-
nokogiri (>= 1.5.9)
76-
mail (2.6.3)
77-
mime-types (>= 1.16, < 3)
78-
mime-types (2.6.2)
79-
mini_portile (0.6.2)
80-
minitest (5.8.1)
81-
multi_json (1.11.2)
82-
nokogiri (1.6.6.2)
83-
mini_portile (~> 0.6.0)
84-
pg (0.18.3)
854
rack (1.6.4)
86-
rack-test (0.6.3)
87-
rack (>= 1.0)
88-
rails (4.2.1)
89-
actionmailer (= 4.2.1)
90-
actionpack (= 4.2.1)
91-
actionview (= 4.2.1)
92-
activejob (= 4.2.1)
93-
activemodel (= 4.2.1)
94-
activerecord (= 4.2.1)
95-
activesupport (= 4.2.1)
96-
bundler (>= 1.3.0, < 2.0)
97-
railties (= 4.2.1)
98-
sprockets-rails
99-
rails-deprecated_sanitizer (1.0.3)
100-
activesupport (>= 4.2.0.alpha)
101-
rails-dom-testing (1.0.7)
102-
activesupport (>= 4.2.0.beta, < 5.0)
103-
nokogiri (~> 1.6.0)
104-
rails-deprecated_sanitizer (>= 1.0.1)
105-
rails-html-sanitizer (1.0.2)
106-
loofah (~> 2.0)
107-
railties (4.2.1)
108-
actionpack (= 4.2.1)
109-
activesupport (= 4.2.1)
110-
rake (>= 0.8.7)
111-
thor (>= 0.18.1, < 2.0)
112-
rake (10.4.2)
113-
rdoc (4.2.0)
114-
sass (3.4.19)
115-
sass-rails (5.0.4)
116-
railties (>= 4.0.0, < 5.0)
117-
sass (~> 3.1)
118-
sprockets (>= 2.8, < 4.0)
119-
sprockets-rails (>= 2.0, < 4.0)
120-
tilt (>= 1.1, < 3)
121-
sdoc (0.4.1)
122-
json (~> 1.7, >= 1.7.7)
123-
rdoc (~> 4.0)
124-
spring (1.4.0)
125-
sprockets (3.4.0)
126-
rack (> 1, < 3)
127-
sprockets-rails (2.3.3)
128-
actionpack (>= 3.0)
129-
activesupport (>= 3.0)
130-
sprockets (>= 2.8, < 4.0)
131-
svgplot (0.2.0)
132-
thor (0.19.1)
133-
thread_safe (0.3.5)
5+
rack-protection (1.5.3)
6+
rack
7+
sinatra (1.4.6)
8+
rack (~> 1.4)
9+
rack-protection (~> 1.4)
10+
tilt (>= 1.3, < 3)
13411
tilt (2.0.1)
135-
turbolinks (2.5.3)
136-
coffee-rails
137-
tzinfo (1.2.2)
138-
thread_safe (~> 0.1)
139-
uglifier (2.7.2)
140-
execjs (>= 0.3.0)
141-
json (>= 1.8.0)
142-
web-console (2.2.1)
143-
activemodel (>= 4.0)
144-
binding_of_caller (>= 0.7.2)
145-
railties (>= 4.0)
146-
sprockets-rails (>= 2.0, < 4.0)
14712

14813
PLATFORMS
14914
ruby
15015

15116
DEPENDENCIES
152-
byebug
153-
coffee-rails (~> 4.1.0)
154-
githubchart
155-
jbuilder (~> 2.0)
156-
jquery-rails
157-
pg
158-
rails (= 4.2.1)
159-
sass-rails (~> 5.0)
160-
sdoc (~> 0.4.0)
161-
spring
162-
turbolinks
163-
uglifier (>= 1.3.0)
164-
web-console (~> 2.0)
17+
sinatra
16518

16619
BUNDLED WITH
16720
1.10.6

Rakefile

Lines changed: 0 additions & 6 deletions
This file was deleted.

app.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
require 'sinatra'
2+
require 'githubchart'
3+
4+
get '/' do
5+
send_file File.join(settings.public_folder, 'index.html')
6+
end
7+
8+
9+
get '/:username' do
10+
headers 'Content-Type' => "image/svg+xml"
11+
12+
svg = GithubChart.new(user: params[:username]).svg
13+
14+
stream do |out|
15+
out << svg
16+
end
17+
end

app/assets/images/.keep

Whitespace-only changes.

app/assets/javascripts/application.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

app/assets/javascripts/chart.coffee

Lines changed: 0 additions & 3 deletions
This file was deleted.

app/assets/stylesheets/application.css

Lines changed: 0 additions & 15 deletions
This file was deleted.

app/assets/stylesheets/chart.scss

Lines changed: 0 additions & 8 deletions
This file was deleted.

app/assets/stylesheets/scaffolds.scss

Lines changed: 0 additions & 73 deletions
This file was deleted.

app/controllers/application_controller.rb

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/controllers/chart_controller.rb

Lines changed: 0 additions & 12 deletions
This file was deleted.

app/controllers/concerns/.keep

Whitespace-only changes.

app/helpers/application_helper.rb

Lines changed: 0 additions & 2 deletions
This file was deleted.

app/helpers/chart_helper.rb

Lines changed: 0 additions & 2 deletions
This file was deleted.

app/mailers/.keep

Whitespace-only changes.

app/models/.keep

Whitespace-only changes.

app/models/concerns/.keep

Whitespace-only changes.

0 commit comments

Comments
 (0)