From e100020bb3e493532819add3156c06e9c3c33fb7 Mon Sep 17 00:00:00 2001 From: topcbl Date: Tue, 17 Apr 2018 13:45:16 +0700 Subject: [PATCH] Test CI. --- .drone.yml | 14 ++++++++++++++ .framgia-ci.yml | 6 ++++++ Dockerfile | 12 ++++++++++++ Gemfile | 2 +- lib/grape_on_rails.rb | 2 +- 5 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 .drone.yml create mode 100644 .framgia-ci.yml create mode 100644 Dockerfile diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..83f3339 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,14 @@ +pipeline: + build: + image: topcbl/framgia_glpa + commands: + - bundle install + - framgia-ci run + + docker: + image: plugins/docker + username: ${REGISTRY_USER} + password: ${REGISTRY_PWD} + repo: chau-bao-long/annyeongsv + tags: latest + diff --git a/.framgia-ci.yml b/.framgia-ci.yml new file mode 100644 index 0000000..4596ed0 --- /dev/null +++ b/.framgia-ci.yml @@ -0,0 +1,6 @@ +project_type: ruby +test: + rubocop: + command: bundle exec rubocop + + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..171e74e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM ruby:2.4.1 + +RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - && apt-get install -y nodejs && npm install -g gulp-cli bower eslint babel-eslint eslint-plugin-angular +RUN apt-get -y update +RUN apt-get -y install qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x xvfb + +COPY Gemfile /cache/Gemfile +COPY Gemfile.lock /cache/Gemfile.lock + +RUN cd /cache && bundle install + +RUN curl -o /usr/bin/framgia-ci https://raw.githubusercontent.com/framgia/ci-report-tool/master/dist/framgia-ci && chmod +x /usr/bin/framgia-ci diff --git a/Gemfile b/Gemfile index 5023ab7..294d464 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source "https://rubygems.org" git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } # Specify your gem's dependencies in grape_on_rails.gemspec -gemspec +#gemspec gem 'rack', github: 'rack/rack' gem 'arel', github: 'rails/arel' diff --git a/lib/grape_on_rails.rb b/lib/grape_on_rails.rb index 51d6d83..71cb1ee 100644 --- a/lib/grape_on_rails.rb +++ b/lib/grape_on_rails.rb @@ -1,7 +1,7 @@ require "grape_on_rails/version" require "active_support/dependencies/autoload" require "active_support/core_ext/array/extract_options" -require 'active_support/core_ext/module/attribute_accessors' +require "active_support/core_ext/module/attribute_accessors" require "active_support/concern" require "grape_on_rails/sources/yaml_source" require "grape_on_rails/structural_hash"