Skip to content

Commit

Permalink
Fix docker file issues
Browse files Browse the repository at this point in the history
  • Loading branch information
miguejs committed Sep 2, 2017
1 parent c556e7c commit 02c8a66
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ RUN adduser -u 9000 -D app
# 4: Copy just the Gemfile & Gemfile.lock, to avoid the build cache failing whenever any other
# file changed and installing dependencies all over again - a must if your'e developing this
# Dockerfile...
ADD ./belugas-ruby.gemspec* /usr/src/app/
ADD ./lib/belugas/ruby/version.rb /usr/src/app/lib/belugas/ruby/version.rb
ADD ./belugas-node.gemspec* /usr/src/app/
ADD ./lib/belugas/node/version.rb /usr/src/app/lib/belugas/node/version.rb
ADD ./Gemfile* /usr/src/app/

# 5: Install build + runtime dependencies, install/build the app gems, and remove build deps:
Expand All @@ -27,5 +27,5 @@ ADD . /usr/src/app
VOLUME /code
WORKDIR /code

CMD ["/usr/src/app/bin/belugas-ruby", "analyze"]
CMD ["/usr/src/app/bin/belugas-node", "analyze"]

4 changes: 2 additions & 2 deletions belugas-ruby.gemspec → belugas-node.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
spec.authors = ["Miguel Alfredo Garcia Baca"]
spec.email = ["[email protected]"]

spec.summary = %q{A Ruby CLI for node feature detection}
spec.description = %q{A Ruby CLI for node feature detection using awesome Belugas}
spec.summary = %q{A Ruby CLI for node js feature detection}
spec.description = %q{A Ruby CLI for node js feature detection using awesome Belugas}
spec.homepage = "https://github.com/icalialabs/belugas-node"
spec.license = "MIT"

Expand Down
8 changes: 5 additions & 3 deletions lib/belugas/node.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
require "thor"
require "json"

require 'belugas/node/parser/package'
require 'belugas/node/dispatcher'

module Belugas
module Node
class Sonar < Thor
package_name "belugas-node"

desc "analyze --package-path=/app/code", "Ruby feature detection JSON"
desc "analyze --package-path=/app/code", "Node js feature detection JSON"
method_option "package-path", type: :string, default: "/code/package.json", required: false, aliases: "-p"
def analyze
# Do something
dispatcher = Belugas::Node::Dispatcher.new(options["package-path"])
dispatcher.render
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/belugas/node/dispatcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'belugas/node/feature/builder'
require 'belugas/node/parser/package'
require 'belugas/node/standard_names/base'
# require 'belugas/node/libraries_collection'
require 'belugas/node/libraries_collection'

module Belugas
module Node
Expand Down
1 change: 1 addition & 0 deletions lib/belugas/node/parser/package.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'bundler'
require 'belugas/node/dependency'
# Class responsible for parsing the package.json dependencies
module Belugas
module Node
Expand Down

0 comments on commit 02c8a66

Please sign in to comment.