roger 1.9.0 → 1.9.1

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
  SHA256:
3
- metadata.gz: 69986cc9095a927deaa4d0c24ded5939d2ed1ea5373a2e3646af631bf0601c50
4
- data.tar.gz: e2fa26c7a1aed9f93fa55b236acbbd7ecece390c615978c3bf3cc5867621743a
3
+ metadata.gz: 6071a3c717f18dc4886723a0614e5ef650efb9e1147c3b14f2cbdb88e2b8f66a
4
+ data.tar.gz: 39d6a8f3f1bf2dbb762ae3dbc09c5ece10d134557142aa48734565f18d915eb4
5
5
  SHA512:
6
- metadata.gz: 43991d9924c031c0ffae6f413d4a32186c09ad5e4fd64187ca528b97f227b3fa7db5f47476d4b2667900a83516bb20cbcd973165b3cf98b814f06afeb582753d
7
- data.tar.gz: 87cb05672e3960e1c8ca8622af06bcf360e0ddebe73d56ce81a6b3122bacf8d7eff4ec9972bec9fdfe35f2e5e1c4cfbbbaf53f902ac20c3fa508d181b404a9e3
6
+ metadata.gz: 26d5bb54c66be7aad6bf1a7446108fd6c546ee6f08161f36256b7eb00ed7183799bb82a25c182aacf7d66560690b59e41761580464f16a7bddb25ba9008ab9b0
7
+ data.tar.gz: 4f226bb86eb4ba2514889cd67337f02eefbdb997c3a5edfc1226d801f37e8ae88c7a06a0d6d3e32a8a6f9568d35c6eb0bcd78c13b9fc6e50ec496b2668069328
data/.rubocop.yml CHANGED
@@ -32,6 +32,9 @@ Style/ClassAndModuleChildren:
32
32
  Style/SymbolArray:
33
33
  Enabled: false
34
34
 
35
+ Style/FrozenStringLiteralComment:
36
+ Enabled: false
37
+
35
38
  # By default, the rails cops are not run. Override in project or home
36
39
  # directory .rubocop.yml files, or by giving the -R/--rails option.
37
40
  Rails:
data/.travis.yml CHANGED
@@ -1,7 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.7
4
- - 2.5.1
3
+ - 2.3.8
4
+ - 2.5.3
5
+ - 2.6.1
5
6
  - ruby-head
6
7
  before_script:
7
8
  - git config --global user.email "travis-ci@digitpaint.nl"
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 1.9.1
4
+ * Make Roger work on Windows (except the rsync finalizer)
5
+
3
6
  ## Version 1.9.0
4
7
  * Render all *.erb files by default
5
8
  * Update dependencies
@@ -0,0 +1,31 @@
1
+ # Ruby
2
+ # Package your Ruby application.
3
+ # Add steps that install rails, analyze code, save build artifacts, deploy, and more:
4
+ # https://docs.microsoft.com/vsts/pipelines/languages/ruby
5
+
6
+ pool:
7
+ vmImage: 'vs2017-win2016'
8
+
9
+ steps:
10
+ - task: UseRubyVersion@0
11
+ inputs:
12
+ versionSpec: '>= 2.5'
13
+
14
+ - script: choco install zip -y
15
+ displayName: 'Install zip command using chocolatey'
16
+
17
+ - script: |
18
+ git config --global user.email "foo@example.com"
19
+ git config --global user.name "Foo Bar"
20
+ displayName: 'Configure Git for tests that call out to Git'
21
+
22
+ - script: gem install bundler
23
+ displayName: 'gem install bundler'
24
+
25
+ - script: |
26
+ bundle install --retry=3 --jobs=4
27
+ displayName: 'bundle install'
28
+
29
+ - script: bundle exec rake
30
+ displayName: 'bundle exec rake'
31
+
@@ -58,15 +58,15 @@ module Roger::Release::Finalizers
58
58
  FileUtils.cp_r @release.build_path.to_s + "/.", clone_dir.to_s
59
59
 
60
60
  commands = [
61
- %w(git add .), # 4. Add all files
62
- %w(git commit -q -a -m) << "Release #{@release.scm.version}" # 5. Commit
61
+ "git add .", # 4. Add all files
62
+ %(git commit -q -m "Release #{Shellwords.escape(release.scm.version)}") # 5. Commit
63
63
  ]
64
64
 
65
65
  # 6. Git push if in options
66
- commands << (%w(git push origin) << branch) if @options[:push]
66
+ commands << ("git push origin" << Shellwords.escape(branch)) if @options[:push]
67
67
 
68
68
  commands.each do |command|
69
- `#{Shellwords.join(command)}`
69
+ `#{command}`
70
70
  end
71
71
  end
72
72
  end
@@ -50,12 +50,12 @@ module Roger
50
50
 
51
51
  def get_previous_tag_name
52
52
  # Get list of SHA1 that have a ref
53
- sha1s = `git --git-dir=#{safe_git_dir} log --pretty='%H' --simplify-by-decoration`
53
+ sha1s = `git --git-dir=#{safe_git_dir} log --pretty="%H" --simplify-by-decoration`
54
54
  sha1s = sha1s.split("\n")
55
55
  tags = []
56
56
  while tags.size < 2 && sha1s.any?
57
57
  sha1 = sha1s.shift
58
- tag = `git --git-dir=#{safe_git_dir} describe --tags --exact-match #{sha1} 2>/dev/null`
58
+ tag = `git --git-dir=#{safe_git_dir} describe --tags --exact-match #{sha1}`
59
59
  tag = tag.strip
60
60
  tags << tag unless tag.empty?
61
61
  end
@@ -84,11 +84,11 @@ module Roger
84
84
  def scm_version(ref)
85
85
  return nil unless File.exist?(git_dir)
86
86
 
87
- version = `git --git-dir=#{safe_git_dir} describe --tags #{ref} 2>&1`
87
+ version = `git --git-dir=#{safe_git_dir} describe --tags #{ref}`
88
88
 
89
- if $CHILD_STATUS.to_i > 0
89
+ if $CHILD_STATUS.to_i.positive?
90
90
  # HEAD is not a tagged version, get the short SHA1 instead
91
- version = `git --git-dir=#{safe_git_dir} show #{ref} --format=format:"%h" -s 2>&1`
91
+ version = `git --git-dir=#{safe_git_dir} show #{ref} --format=format:"%h" -s`
92
92
  else
93
93
  # HEAD is a tagged version, if version is prefixed with "v" it will be stripped off
94
94
  version.gsub!(/^v/, "")
@@ -105,7 +105,7 @@ module Roger
105
105
  return nil unless File.exist?(git_dir)
106
106
 
107
107
  # Get the date in epoch time
108
- date = `git --git-dir=#{safe_git_dir} show #{ref} --format=format:"%ct" -s 2>&1`
108
+ date = `git --git-dir=#{safe_git_dir} show #{ref} --format=format:"%ct" -s`
109
109
  Time.at(date.to_i) if date =~ /\d+/
110
110
  rescue RuntimeError
111
111
  nil
@@ -79,7 +79,7 @@ module Roger
79
79
  # .html.erb will look at .html
80
80
  def mime_type_from_sub_extension(path)
81
81
  parts = File.basename(path.to_s).split(".")
82
- MIME::Types.type_for(parts[0..-2].join(".")).first if parts.size > 2
82
+ MIME::Types.type_for(parts[0..-2].join(".")).sort.first if parts.size > 2
83
83
  end
84
84
  end
85
85
 
@@ -217,7 +217,7 @@ module Roger
217
217
  relative_to = Pathname.new(File.dirname(relative_to.to_s))
218
218
 
219
219
  # If relative_to is an absolute path
220
- if relative_to.to_s =~ %r{\A/}
220
+ if relative_to.absolute?
221
221
  relative_to = relative_to.relative_path_from(base).cleanpath
222
222
  end
223
223
 
data/lib/roger/server.rb CHANGED
@@ -140,7 +140,7 @@ module Roger
140
140
  Addrinfo.tcp(host, port).listen.close
141
141
 
142
142
  true
143
- rescue SocketError, Errno::EADDRINUSE
143
+ rescue SocketError, Errno::EADDRINUSE, Errno::EACCES
144
144
  false
145
145
  end
146
146
 
data/lib/roger/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # Roger main namespace
2
2
  module Roger
3
- VERSION = "1.9.0".freeze
3
+ VERSION = "1.9.1".freeze
4
4
  end
@@ -48,7 +48,8 @@ module Roger
48
48
  c.directory "template" do |t|
49
49
  system("git init -q")
50
50
  t.file "gitone"
51
- system("git add gitone; git commit -q -am 'test'")
51
+ system("git add gitone")
52
+ system("git commit -q -am 'test'")
52
53
  end
53
54
 
54
55
  git_path = "file://#{c + 'template/.git'}"
@@ -17,6 +17,9 @@ module Roger
17
17
 
18
18
  # A target dir
19
19
  @target_path = setup_construct(chdir: false)
20
+
21
+ omit("Skipping rsync test on Windows") if RUBY_PLATFORM.match("mswin") ||
22
+ RUBY_PLATFORM.match("mingw")
20
23
  end
21
24
 
22
25
  # called after every single test
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flurin Egger
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-09-24 00:00:00.000000000 Z
13
+ date: 2019-02-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor
@@ -185,6 +185,7 @@ files:
185
185
  - MIT_LICENSE
186
186
  - README.md
187
187
  - Rakefile
188
+ - azure-pipelines.yml
188
189
  - bin/roger
189
190
  - doc/cli.md
190
191
  - doc/images/logo_black-yellow.png
@@ -356,7 +357,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
356
357
  version: '0'
357
358
  requirements: []
358
359
  rubyforge_project:
359
- rubygems_version: 2.7.7
360
+ rubygems_version: 2.7.8
360
361
  signing_key:
361
362
  specification_version: 4
362
363
  summary: Roger is a set of tools to create self-containing HTML mockups.