Skip to content

Commit 50a7ed9

Browse files
author
James Moriarty
committed
feature: gemify.
1 parent 7b14f6c commit 50a7ed9

12 files changed

+144
-27
lines changed

CODE_OF_CONDUCT.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project, and in the interest of
4+
fostering an open and welcoming community, we pledge to respect all people who
5+
contribute through reporting issues, posting feature requests, updating
6+
documentation, submitting pull requests or patches, and other activities.
7+
8+
We are committed to making participation in this project a harassment-free
9+
experience for everyone, regardless of level of experience, gender, gender
10+
identity and expression, sexual orientation, disability, personal appearance,
11+
body size, race, ethnicity, age, religion, or nationality.
12+
13+
Examples of unacceptable behavior by participants include:
14+
15+
* The use of sexualized language or imagery
16+
* Personal attacks
17+
* Trolling or insulting/derogatory comments
18+
* Public or private harassment
19+
* Publishing other's private information, such as physical or electronic
20+
addresses, without explicit permission
21+
* Other unethical or unprofessional conduct
22+
23+
Project maintainers have the right and responsibility to remove, edit, or
24+
reject comments, commits, code, wiki edits, issues, and other contributions
25+
that are not aligned to this Code of Conduct, or to ban temporarily or
26+
permanently any contributor for other behaviors that they deem inappropriate,
27+
threatening, offensive, or harmful.
28+
29+
By adopting this Code of Conduct, project maintainers commit themselves to
30+
fairly and consistently applying these principles to every aspect of managing
31+
this project. Project maintainers who do not follow or enforce the Code of
32+
Conduct may be permanently removed from the project team.
33+
34+
This code of conduct applies both within project spaces and in public spaces
35+
when an individual is representing the project or its community.
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
38+
reported by contacting a project maintainer at [email protected]. All
39+
complaints will be reviewed and investigated and will result in a response that
40+
is deemed necessary and appropriate to the circumstances. Maintainers are
41+
obligated to maintain confidentiality with regard to the reporter of an
42+
incident.
43+
44+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45+
version 1.3.0, available at
46+
[http://contributor-covenant.org/version/1/3/0/][version]
47+
48+
[homepage]: http://contributor-covenant.org
49+
[version]: http://contributor-covenant.org/version/1/3/0/

Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ RUN apk add --no-cache git imagemagick make gcc libc-dev libxml2-dev libxslt-dev
1111

1212
RUN mkdir $APP_HOME
1313
WORKDIR $APP_HOME
14+
COPY poto.gemspec $APP_HOME/poto.gemspec
1415
COPY Gemfile $APP_HOME/Gemfile
1516
COPY Gemfile.lock $APP_HOME/Gemfile.lock
17+
COPY lib/poto/version.rb $APP_HOME/lib/poto/version.rb
1618
RUN bundle install --jobs $(expr $(cat /proc/cpuinfo | grep processor | wc -l) - 1) --retry 3
1719
COPY . $APP_HOME
1820

19-
CMD bin/poto-aws-s3
21+
CMD exe/poto-aws-s3

Gemfile

+3-10
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,14 @@ source 'https://rubygems.org'
22

33
ruby '2.3.0'
44

5-
gem 'aws-sdk'
6-
gem 'google-cloud-storage'
7-
gem 'grape', '~> 0.11'
8-
gem 'grape-roar', '~> 0.3'
9-
gem 'mini_magick'
10-
gem 'puma'
11-
gem 'roar'
12-
gem 'sinatra'
5+
gemspec
136

147
group 'test' do
158
gem 'codeclimate-test-reporter'
169
gem 'pry'
1710
gem 'rack-test'
18-
gem 'rake', '~> 10.0'
11+
gem 'rake', '~> 10.0'
1912
gem 'rspec'
20-
gem 'rubocop', require: false
13+
gem 'rubocop', require: false
2114
gem 'simplecov'
2215
end

Gemfile.lock

+15-8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
PATH
2+
remote: .
3+
specs:
4+
poto (0.1.0)
5+
aws-sdk
6+
google-cloud-storage
7+
grape (~> 0.11)
8+
grape-roar (~> 0.3)
9+
mini_magick
10+
puma
11+
roar
12+
sinatra
13+
114
GEM
215
remote: https://rubygems.org/
316
specs:
@@ -170,21 +183,15 @@ PLATFORMS
170183
ruby
171184

172185
DEPENDENCIES
173-
aws-sdk
186+
bundler (~> 1.11)
174187
codeclimate-test-reporter
175-
google-cloud-storage
176-
grape (~> 0.11)
177-
grape-roar (~> 0.3)
178-
mini_magick
188+
poto!
179189
pry
180-
puma
181190
rack-test
182191
rake (~> 10.0)
183-
roar
184192
rspec
185193
rubocop
186194
simplecov
187-
sinatra
188195

189196
BUNDLED WITH
190197
1.11.2

LICENSE.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 James Moriarty
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

Procfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web: bundle exec bin/poto-aws-s3
1+
web: bundle exec exe/poto-aws-s3

Rakefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
begin
2+
require 'bundler/gem_tasks'
23
require 'rspec/core/rake_task'
34

45
RSpec::Core::RakeTask.new(:spec)
56

67
task default: :spec
7-
rescue LoadError
8-
puts 'no rspec available'
8+
rescue LoadError => e
9+
puts e.message
910
end

bin/console

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
#!/usr/bin/env ruby
22

3-
require 'bundler/setup'
4-
require 'poto'
3+
require "bundler/setup"
4+
require "poto"
55

66
# You can add fixtures and/or initialization code here to make experimenting
77
# with your gem easier. You can also use a different console, if you like.
88

9-
require 'pry'
10-
Pry.start
9+
# (If you use this, don't forget to add pry to your Gemfile!)
10+
# require "pry"
11+
# Pry.start
12+
13+
require "irb"
14+
IRB.start

bin/setup

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -euo pipefail
33
IFS=$'\n\t'
4+
set -vx
45

56
bundle install
67

bin/poto-aws-s3 exe/poto-aws-s3

File renamed without changes.
File renamed without changes.

poto.gemspec

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# coding: utf-8
2+
lib = File.expand_path('../lib', __FILE__)
3+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4+
require 'poto/version'
5+
6+
Gem::Specification.new do |spec|
7+
spec.name = "poto"
8+
spec.version = Poto::VERSION
9+
spec.authors = ["James Moriarty"]
10+
spec.email = ["[email protected]"]
11+
12+
spec.summary = %q{Cloud storage to image gallery + image proxy + file api}
13+
spec.homepage = "https://github.com/jamesmoriarty/poto"
14+
spec.license = "MIT"
15+
16+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17+
# to allow pushing to a single host or delete this section to allow pushing to any host.
18+
if spec.respond_to?(:metadata)
19+
spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
20+
else
21+
raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
22+
end
23+
24+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25+
spec.bindir = "exe"
26+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27+
spec.require_paths = ["lib"]
28+
29+
spec.add_runtime_dependency 'aws-sdk'
30+
spec.add_runtime_dependency 'google-cloud-storage'
31+
spec.add_runtime_dependency 'grape', '~> 0.11'
32+
spec.add_runtime_dependency 'grape-roar', '~> 0.3'
33+
spec.add_runtime_dependency 'mini_magick'
34+
spec.add_runtime_dependency 'puma'
35+
spec.add_runtime_dependency 'roar'
36+
spec.add_runtime_dependency 'sinatra'
37+
spec.add_development_dependency "bundler", "~> 1.11"
38+
spec.add_development_dependency "rake", "~> 10.0"
39+
end

0 commit comments

Comments
 (0)