lint_trap 0.0.16 → 0.0.17

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: 5bc37f9f82c78cd395b59c6c0db07c517734a50f
4
- data.tar.gz: d6f3c7092a1cf4118ee781126b7c4ccaddec4c5f
3
+ metadata.gz: c5e5a4f35fcf796849dc1b87cb334f3fb6e8d380
4
+ data.tar.gz: 854b0a92c9857ff33f4cf2e2f79d08eec59deaec
5
5
  SHA512:
6
- metadata.gz: 9587a9b916aaadb66a8e4e8144836d035fba86ba36c7aba527f3edbfd7c316f7079c8630b08c4b27d4056b5e9e994857a3bda47930d5d8a9b137589ecdf029ca
7
- data.tar.gz: 6f1f42b7a96f2b26ca0f0f4fff5a796065439bb65117531d6ce63c4be3b709d9209498e0107f16c8d7517bb39df726bf3706de63fd7ad87ff1cd5e5e1b401f05
6
+ metadata.gz: bd38d5fe65359d5259e0b0e7517c4f5914f80933bfa19f270b2392eda0ab823b452597d85e79921d3b5c79b5168e859266cdee7b6d5f05fdef6eb27e95b95578
7
+ data.tar.gz: 443441fc6a79e06ace99378dfd5afae57893eb6fea625ba414812f0a638e6bf3c4486c76998a80a919291445b46c2233096df07adabd7543683b0aef79b73143
@@ -9,6 +9,8 @@ module LintTrap
9
9
 
10
10
  LOCAL_CONFIG_PATH = Pathname.new(File.expand_path('../../../../config', __FILE__))
11
11
 
12
+ attr_reader :image
13
+
12
14
  def initialize(image, repo_path, options = {})
13
15
  @image = image
14
16
  @repo_path = Pathname.new(repo_path)
@@ -33,7 +35,7 @@ module LintTrap
33
35
 
34
36
  protected
35
37
 
36
- attr_reader :image, :repo_path, :options
38
+ attr_reader :repo_path, :options
37
39
 
38
40
  private
39
41
 
@@ -1,4 +1,4 @@
1
1
  # Gem to detect and lint files
2
2
  module LintTrap
3
- VERSION = '0.0.16'
3
+ VERSION = '0.0.17'
4
4
  end
@@ -5,6 +5,8 @@ describe LintTrap::Container::Base do
5
5
  Class.new(described_class).new('lintci/rubocop', '/src')
6
6
  end
7
7
 
8
+ its(:image){is_expected.to eq('lintci/rubocop')}
9
+
8
10
  describe '#pull' do
9
11
  it 'raises an error if not overriden' do
10
12
  expect{container.pull}.to raise_error(NotImplementedError, 'Must implement pull.')
@@ -4,6 +4,8 @@ describe LintTrap::Container::Docker do
4
4
  let(:image){LintTrap::Linter::RuboCop.new.image_version}
5
5
  subject(:container){described_class.new(image, '/local/path')}
6
6
 
7
+ its(:image){is_expected.to eq(image)}
8
+
7
9
  describe '#pull' do
8
10
  context 'when image exists' do
9
11
  it 'completes successfully' do
@@ -3,6 +3,8 @@ require 'spec_helper'
3
3
  describe LintTrap::Container::Fake do
4
4
  subject(:container){described_class.new}
5
5
 
6
+ its(:image){is_expected.to eq('no/image')}
7
+
6
8
  describe '#wrap' do
7
9
  it 'returns the command passed in' do
8
10
  expect(container.wrap('ls')).to eq('ls')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lint_trap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Allen Madsen
@@ -118,7 +118,6 @@ files:
118
118
  - ".gitignore"
119
119
  - ".rspec"
120
120
  - ".rubocop.yml"
121
- - Dockerfile
122
121
  - Gemfile
123
122
  - LICENSE.txt
124
123
  - README.md
data/Dockerfile DELETED
@@ -1,229 +0,0 @@
1
- FROM ubuntu:trusty
2
- MAINTAINER Allen Madsen
3
-
4
- ###### Create user
5
- ENV user spin_cycle
6
- ENV group linters
7
- ENV homedir /home/spin_cycle
8
-
9
- RUN mkdir -p $homedir \
10
- && groupadd -r $group -g 777 \
11
- && useradd -u 666 -r -g $group -d $homedir -s /sbin/nologin -c "Docker image user" $user \
12
- && chown -R $user:$group $homedir
13
-
14
- ###### Packages
15
- USER root
16
-
17
- RUN apt-get update && apt-get install -y \
18
- bzr \
19
- cvs \
20
- git \
21
- mercurial \
22
- subversion \
23
- && rm -rf /var/lib/apt/lists/*
24
-
25
- RUN apt-get update && apt-get install -y \
26
- curl \
27
- wget \
28
- && rm -rf /var/lib/apt/lists/*
29
-
30
- RUN apt-get update && apt-get install -y \
31
- autoconf \
32
- build-essential \
33
- imagemagick \
34
- libbz2-dev \
35
- libcurl4-openssl-dev \
36
- libevent-dev \
37
- libffi-dev \
38
- libglib2.0-dev \
39
- libjpeg-dev \
40
- libmagickcore-dev \
41
- libmagickwand-dev \
42
- libmysqlclient-dev \
43
- libncurses-dev \
44
- libpq-dev \
45
- libreadline-dev \
46
- libsqlite3-dev \
47
- libssl-dev \
48
- libxml2-dev \
49
- libxslt-dev \
50
- libyaml-dev \
51
- python-software-properties \
52
- software-properties-common \
53
- zlib1g-dev \
54
- && rm -rf /var/lib/apt/lists/*
55
-
56
- ###### Languages
57
-
58
- ### Node.js
59
- RUN apt-get update && apt-get install -y \
60
- ca-certificates \
61
- && rm -rf /var/lib/apt/lists/*
62
-
63
- # verify gpg and sha256: http://nodejs.org/dist/v0.10.31/SHASUMS256.txt.asc
64
- # gpg: aka "Timothy J Fontaine (Work) <tj.fontaine@joyent.com>"
65
- RUN gpg --keyserver pgp.mit.edu --recv-keys 7937DFD2AB06298B2293C3187D33FF9D0246406D
66
-
67
- ENV NODE_VERSION 0.10.35
68
- ENV NPM_VERSION 2.1.16
69
-
70
- RUN curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \
71
- && curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
72
- && gpg --verify SHASUMS256.txt.asc \
73
- && grep " node-v$NODE_VERSION-linux-x64.tar.gz\$" SHASUMS256.txt.asc | sha256sum -c - \
74
- && tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \
75
- && rm "node-v$NODE_VERSION-linux-x64.tar.gz" SHASUMS256.txt.asc \
76
- && npm install -g npm@"$NPM_VERSION" \
77
- && npm cache clear
78
-
79
- ### Ruby
80
- RUN apt-get update && apt-get install -y \
81
- curl \
82
- procps \
83
- && rm -rf /var/lib/apt/lists/*
84
-
85
- ENV RUBY_MAJOR 2.2
86
- ENV RUBY_VERSION 2.2.0
87
-
88
- # some of ruby's build scripts are written in ruby
89
- # we purge this later to make sure our final image uses what we just built
90
- RUN apt-get update \
91
- && apt-get install -y \
92
- bison \
93
- ruby \
94
- && rm -rf /var/lib/apt/lists/* \
95
- && mkdir -p /usr/src/ruby \
96
- && curl -SL "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.bz2" \
97
- | tar -xjC /usr/src/ruby --strip-components=1 \
98
- && cd /usr/src/ruby \
99
- && autoconf \
100
- && ./configure --disable-install-doc \
101
- && make -j"$(nproc)" \
102
- && apt-get purge -y --auto-remove bison ruby \
103
- && make install \
104
- && rm -r /usr/src/ruby
105
-
106
- # skip installing gem documentation
107
- RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME/.gemrc"
108
-
109
- ### Java
110
- RUN echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true \
111
- | debconf-set-selections \
112
- && add-apt-repository -y ppa:webupd8team/java \
113
- && apt-get update \
114
- && apt-get install -y \
115
- oracle-java7-installer \
116
- && rm -rf /var/lib/apt/lists/* \
117
- && rm -rf /var/cache/oracle-jdk7-installer
118
-
119
- # Define commonly used JAVA_HOME variable
120
- ENV JAVA_HOME /usr/lib/jvm/java-7-oracle
121
-
122
- ### Go
123
- # SCMs for "go get", gcc for cgo
124
- RUN apt-get update \
125
- && apt-get install -y \
126
- ca-certificates \
127
- curl \
128
- gcc \
129
- libc6-dev \
130
- make \
131
- bzr \
132
- git \
133
- mercurial \
134
- --no-install-recommends \
135
- && rm -rf /var/lib/apt/lists/*
136
-
137
- ENV GOLANG_VERSION 1.4
138
-
139
- RUN curl -sSL https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz \
140
- | tar -v -C /usr/src -xz \
141
- && cd /usr/src/go/src \
142
- && ./make.bash --no-clean 2>&1
143
-
144
- ENV PATH /usr/src/go/bin:$PATH
145
-
146
- RUN mkdir -p /go/src
147
- ENV GOPATH /go
148
- ENV PATH /go/bin:$PATH
149
-
150
- ### Python
151
- # remove several traces of debian python
152
- RUN apt-get purge -y python.*
153
-
154
- # http://bugs.python.org/issue19846
155
- # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
156
- ENV LANG C.UTF-8
157
-
158
- ENV PYTHON_VERSION 2.7.9
159
-
160
- RUN set -x \
161
- && mkdir -p /usr/src/python \
162
- && curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
163
- | tar -xJC /usr/src/python --strip-components=1 \
164
- && cd /usr/src/python \
165
- && ./configure --enable-shared \
166
- && make -j$(nproc) \
167
- && make install \
168
- && ldconfig \
169
- && curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python2 \
170
- && find /usr/local \
171
- \( -type d -a -name test -o -name tests \) \
172
- -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
173
- -exec rm -rf '{}' + \
174
- && rm -rf /usr/src/python
175
-
176
- ###### Linters
177
-
178
- ### CPPCheck
179
- ENV CPPCHECK_VERSION 1.61-1
180
-
181
- RUN apt-get update \
182
- && apt-get install -y \
183
- cppcheck=$CPPCHECK_VERSION \
184
- && rm -rf /var/lib/apt/lists/*
185
-
186
- ### GoLint
187
- RUN go get github.com/golang/lint/golint
188
-
189
- ### JSHint, CSSLint, JSONLint, CoffeeLint
190
- ENV JSHINT_VERSION 2.5.11
191
- ENV CSSLINT_VERSION 0.10.0
192
- ENV JSONLINT_VERSION 0.0.4
193
- ENV COFFEELINT_VERSION 1.8.1
194
-
195
- RUN npm install -g \
196
- jshint@$JSHINT_VERSION \
197
- csslint@$CSSLINT_VERSION \
198
- durable-json-lint-cli@$JSONLINT_VERSION \
199
- coffeelint@$COFFEELINT_VERSION
200
-
201
- ### PyLint
202
- ENV PYLINT_VERSION 1.4.0
203
-
204
- RUN pip install pylint==$PYLINT_VERSION
205
-
206
- ### RuboCop, SCSSLint
207
- ENV RUBOCOP_VERSION 0.28.0
208
- ENV SCSSLINT_VERSION 0.32.0
209
-
210
- RUN gem install rubocop:$RUBOCOP_VERSION scss-lint:$SCSSLINT_VERSION
211
-
212
- ###### Display Versions
213
- RUN echo 'CPPCheck' && cppcheck --version && echo \
214
- && echo 'Go' && go version && echo \
215
- && echo 'GoLint' && which golint && echo \
216
- && echo 'Java' && java -version && echo \
217
- && echo 'JavaScript' && node --version && echo \
218
- && echo 'JSHint' && jshint --version && echo \
219
- && echo 'CSSLint' && csslint --version && echo \
220
- && echo 'JSONLint' && durable-json-lint --version && echo \
221
- && echo 'Python' && python --version && echo \
222
- && echo 'PyLint' && pylint --version && echo \
223
- && echo 'Ruby' && ruby --version && echo \
224
- && echo 'RuboCop' && rubocop --version && echo \
225
- && echo 'SCSSLint' && scss-lint --version && echo
226
-
227
- ###### Finally
228
- USER $user
229
- WORKDIR $homedir