photish 0.7.3 → 0.7.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: deb96bd1233e7f8402ab70d799475ac97212cce6
4
- data.tar.gz: f8eb7f3230b5b9a984583bf3ab4f77e470097b58
3
+ metadata.gz: 5ede68b972dc590f4d2e0c7a6486f5958227926e
4
+ data.tar.gz: b7fecc51e3a2826fd635f4411bf08f6d4b2bc1bf
5
5
  SHA512:
6
- metadata.gz: 166444192425d14d3310bb31b9284758bf688f0b171b97612d5dccaf3cb4a5e3ef0865ef6fcc5bfba08721555a9bb3b5d30f10814c8978eaa667d6fa391e8147
7
- data.tar.gz: f354276c015da3847949deef0390fb0734fa275fc0f76f42e3be0b555534f923c0eed6c44b4a71b754ffab3c9010cb4b836e8b6bc929532b433d67dec4d0d763
6
+ metadata.gz: 8534f49c34bb67415c349b506ec3efa33d39dbc420c807d8d9456603d9950a5c6685f1feec42dff18a02c84439c962eb3e475e856303e811e85dba185685a1a4
7
+ data.tar.gz: d37f124ca03187e23976269ac567d78e453454e28a14be0eeef3a821d0a3e7cdac8413cf55f3748b58a0dbcf2c2d71fda86c7a8e4d7db71fb3186db9e8b517a0
data/.travis.yml CHANGED
@@ -4,8 +4,6 @@ before_install:
4
4
  - gem install bundler -v 1.10.6
5
5
  script: bundle exec rake
6
6
  addons:
7
- code_climate:
8
- repo_token: ae398c193255da8c5e030cb6251f053c76757635e5215e65efa32f52d003a519
9
7
  apt:
10
8
  packages:
11
9
  - libmagic-dev
@@ -13,8 +11,6 @@ addons:
13
11
  cache: bundler
14
12
  matrix:
15
13
  include:
16
- - rvm: 2.3.0
17
- env: COVERAGE=1
18
14
  - rvm: jruby-9.0
19
15
  env: SMOKE_TEST_ONLY=1
20
16
  - rvm: rbx-3.2
data/Rakefile CHANGED
@@ -1,61 +1,11 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
- require 'cucumber'
4
- require 'cucumber/rake/task'
5
- require 'photish/rake/task'
6
- require 'metric_fu'
7
- require 'colorize'
8
-
9
- RSpec::Core::RakeTask.new(:spec)
10
-
11
- Cucumber::Rake::Task.new(:features) do |t|
12
- tags = ['']
13
- tags << '--tags ~@wip'
14
- tags << '--tags @smoke' if ENV['SMOKE_TEST_ONLY']
15
- t.cucumber_opts = "features --format pretty #{tags.join(' ')}"
16
- end
17
-
18
- desc 'Gather code climate results'
19
- task :gather_coverage do
20
- next unless ENV['COVERAGE']
21
- require 'simplecov'
22
- require 'codeclimate-test-reporter'
23
- CodeClimate::TestReporter::Formatter.new.format(SimpleCov.result)
24
- end
1
+ Dir.glob('tasks/*.rake').each { |r| import r }
25
2
 
26
3
  desc 'Clean output folders'
27
4
  task :clean do
28
5
  FileUtils.rm_rf('coverage')
29
6
  end
30
7
 
31
- desc 'Release a new version'
32
- task :bump do
33
- system("mvim -f lib/photish/version.rb") || abort('Error updating version'.red)
34
- system("git add lib/photish/version.rb") || abort('Error adding verison'.red)
35
- system("git commit") || abort("Error creating commit".red)
36
- system("git diff-index --quiet HEAD") || abort("Uncommited changes".red)
37
- system("rake release:source_control_push") || abort("Creating tag failed".red)
38
- end
39
-
40
8
  task :default => [:clean,
41
9
  :spec,
42
10
  :features,
43
11
  :gather_coverage]
44
-
45
- task :stats => ['metrics:all']
46
-
47
- namespace :photish do
48
- Photish::Rake::Task.new(:init, 'Creates a basic project') do |t|
49
- t.options = "init"
50
- end
51
-
52
- Photish::Rake::Task.new(:generate, 'Generates all the code') do |t|
53
- t.options = "generate"
54
- end
55
-
56
- Photish::Rake::Task.new(:host, 'Starts a HTTP and hosts the code') do |t|
57
- t.options = "host"
58
- end
59
-
60
- task :all => [:init, :generate, :host]
61
- end
data/TODO.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  ## In Progress
4
4
 
5
- 1. Enhance snapci pipelines
5
+ 1. Test a release with latest code
6
+ 1. Update README to reference releases
6
7
 
7
8
  ## Backlog
8
9
 
@@ -16,3 +17,5 @@
16
17
  1. Add unit tests to classes relying on feature tests
17
18
  1. Improve metric scores from `rake stats`
18
19
  1. Travelling Ruby binaries
20
+ 1. Fix jruby tests on snap-ci
21
+ 1. Setup rbx builds on snap-ci
@@ -15,7 +15,7 @@ source "$DIR/setup.sh"
15
15
  # conditionally release app
16
16
  if git describe --exact-match $COMMIT && [ $BRANCH = 'master' ]
17
17
  then
18
- bundle exec rake build release:rubygem_push
18
+ bundle exec rake build release:rubygem_push release:github
19
19
  else
20
20
  echo "This is not a tagged commit on master, skipping release."
21
21
  fi
@@ -1,5 +1,5 @@
1
1
  module Photish
2
- VERSION = "0.7.3"
2
+ VERSION = "0.7.4"
3
3
  AUTHOR_NAME = "Henry Lawson"
4
4
  AUTHOR_EMAIL = "henry.lawson@foinq.com"
5
5
  end
@@ -0,0 +1,11 @@
1
+ require 'metric_fu'
2
+
3
+ desc 'Gather code climate results'
4
+ task :gather_coverage do
5
+ next unless ENV['COVERAGE']
6
+ require 'simplecov'
7
+ require 'codeclimate-test-reporter'
8
+ CodeClimate::TestReporter::Formatter.new.format(SimpleCov.result)
9
+ end
10
+
11
+ task :stats => ['metrics:all']
@@ -0,0 +1,17 @@
1
+ require 'photish/rake/task'
2
+
3
+ namespace :photish do
4
+ Photish::Rake::Task.new(:init, 'Creates a basic project') do |t|
5
+ t.options = "init"
6
+ end
7
+
8
+ Photish::Rake::Task.new(:generate, 'Generates all the code') do |t|
9
+ t.options = "generate"
10
+ end
11
+
12
+ Photish::Rake::Task.new(:host, 'Starts a HTTP and hosts the code') do |t|
13
+ t.options = "host"
14
+ end
15
+
16
+ task :all => [:init, :generate, :host]
17
+ end
@@ -0,0 +1,38 @@
1
+ require "bundler/gem_tasks"
2
+ require 'colorize'
3
+
4
+ desc 'Release a new version'
5
+ task :bump do
6
+ system("mvim -f lib/photish/version.rb") || abort('Error updating version'.red)
7
+ system("git add lib/photish/version.rb") || abort('Error adding verison'.red)
8
+ system("git commit") || abort("Error creating commit".red)
9
+ system("git diff-index --quiet HEAD") || abort("Uncommited changes".red)
10
+ system("rake release:source_control_push") || abort("Creating tag failed".red)
11
+ end
12
+
13
+ desc 'Release information to gtihub'
14
+ task 'release:github' do
15
+ raise "Please provide a GITHUB_TOKEN" unless ENV['GITHUB_TOKEN']
16
+ payload = {
17
+ tag_name: "v#{Photish::VERSION}",
18
+ target_commiish: "master",
19
+ name: "Photish v#{Photish::VERSION}",
20
+ body: `git log -1 --pretty=%B`.strip
21
+ }
22
+ puts response = JSON.parse(`curl -sS -H "Content-Type: application/json" \
23
+ -u henrylawson:#{ENV['GITHUB_TOKEN']} \
24
+ --request POST \
25
+ --data '#{payload.to_json}' \
26
+ https://api.github.com/repos/henrylawson/photish/releases`)
27
+
28
+ puts upload_url = response['upload_url'].gsub(/\{.*\}/, '')
29
+ [{ path: "pkg/photish-#{Photish::VERSION}.gem",
30
+ name: "photish-#{Photish::VERSION}.gem",
31
+ label: 'Ruby Gem' }].each do |file|
32
+ puts JSON.parse(`curl -sS -H "Content-Type: application/octet-stream" \
33
+ -u henrylawson:#{ENV['GITHUB_TOKEN']} \
34
+ --request POST \
35
+ --data-binary @"#{file[:path]}" \
36
+ #{upload_url}?name=#{URI.escape(file[:name])}&label=#{URI.escape(file[:label])}`)
37
+ end
38
+ end
data/tasks/tests.rake ADDED
@@ -0,0 +1,12 @@
1
+ require "rspec/core/rake_task"
2
+ require 'cucumber'
3
+ require 'cucumber/rake/task'
4
+
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ Cucumber::Rake::Task.new(:features) do |t|
8
+ tags = ['']
9
+ tags << '--tags ~@wip'
10
+ tags << '--tags @smoke' if ENV['SMOKE_TEST_ONLY']
11
+ t.cucumber_opts = "features --format pretty #{tags.join(' ')}"
12
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: photish
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henry Lawson
@@ -449,6 +449,10 @@ files:
449
449
  - lib/photish/render/template.rb
450
450
  - lib/photish/version.rb
451
451
  - photish.gemspec
452
+ - tasks/metrics.rake
453
+ - tasks/photish.rake
454
+ - tasks/release.rake
455
+ - tasks/tests.rake
452
456
  homepage: https://github.com/henrylawson/photish
453
457
  licenses:
454
458
  - MIT