diff --git a/.rubocop.yml b/.rubocop.yml index 533a324..86b0023 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -19,6 +19,8 @@ AllCops: - libexec/*/** - bin/* - test/* + Exclude: + - src/css/vendor/tail.css/bin/* ## # Enabled diff --git a/twenty-cli/.rubocop.yml b/twenty-cli/.rubocop.yml index bf7a2b9..6ce4f28 100644 --- a/twenty-cli/.rubocop.yml +++ b/twenty-cli/.rubocop.yml @@ -24,6 +24,8 @@ AllCops: - libexec/*/** - bin/* - test/* + Exclude: + - src/css/vendor/tail.css/bin/* ## # Enabled diff --git a/twenty-client/.rubocop.yml b/twenty-client/.rubocop.yml index bf7a2b9..6ce4f28 100644 --- a/twenty-client/.rubocop.yml +++ b/twenty-client/.rubocop.yml @@ -24,6 +24,8 @@ AllCops: - libexec/*/** - bin/* - test/* + Exclude: + - src/css/vendor/tail.css/bin/* ## # Enabled diff --git a/twenty-client/Rules b/twenty-client/Rules index bbe9dbf..afa311a 100644 --- a/twenty-client/Rules +++ b/twenty-client/Rules @@ -6,7 +6,6 @@ require "nanoc-webpack" buildenv = ENV["buildenv"] || "development" Nanoc::Webpack.default_argv.concat ["--config", "webpack.#{buildenv}.js"] - def require_rules(rules, locals = {}, target = binding) locals.each { target.local_variable_set(_1, _2) } path = File.join(Dir.getwd, rules) diff --git a/twenty-server/.rubocop.yml b/twenty-server/.rubocop.yml index bf7a2b9..6ce4f28 100644 --- a/twenty-server/.rubocop.yml +++ b/twenty-server/.rubocop.yml @@ -24,6 +24,8 @@ AllCops: - libexec/*/** - bin/* - test/* + Exclude: + - src/css/vendor/tail.css/bin/* ## # Enabled diff --git a/twenty-server/lib/twenty-server/graphql.rb b/twenty-server/lib/twenty-server/graphql.rb index 1fd86b3..e948d1a 100644 --- a/twenty-server/lib/twenty-server/graphql.rb +++ b/twenty-server/lib/twenty-server/graphql.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Twenty::GraphQL require "graphql" require_relative "graphql/input" diff --git a/twenty-server/lib/twenty-server/graphql/input/task_input.rb b/twenty-server/lib/twenty-server/graphql/input/task_input.rb index 2508add..2fbf1b6 100644 --- a/twenty-server/lib/twenty-server/graphql/input/task_input.rb +++ b/twenty-server/lib/twenty-server/graphql/input/task_input.rb @@ -5,6 +5,6 @@ module Twenty::GraphQL::Input argument :title, String, required: false argument :content, String, required: false argument :project_id, Int, required: false - argument :status, 'Twenty::GraphQL::Type::TaskStatus', required: false + argument :status, "Twenty::GraphQL::Type::TaskStatus", required: false end end diff --git a/twenty-server/lib/twenty-server/graphql/mutation/set_random_project_color.rb b/twenty-server/lib/twenty-server/graphql/mutation/set_random_project_color.rb index 0d7a727..630b71a 100644 --- a/twenty-server/lib/twenty-server/graphql/mutation/set_random_project_color.rb +++ b/twenty-server/lib/twenty-server/graphql/mutation/set_random_project_color.rb @@ -5,7 +5,7 @@ module Twenty::GraphQL::Mutation argument :project_id, Int, required: true field :errors, [String], null: false - field :project, 'Twenty::GraphQL::Type::Project', null: true + field :project, "Twenty::GraphQL::Type::Project", null: true def resolve(project_id:) project = Twenty::Project.with_pk!(project_id) diff --git a/twenty-server/lib/twenty-server/graphql/type/project.rb b/twenty-server/lib/twenty-server/graphql/type/project.rb index 3c70fea..e611802 100644 --- a/twenty-server/lib/twenty-server/graphql/type/project.rb +++ b/twenty-server/lib/twenty-server/graphql/type/project.rb @@ -6,6 +6,6 @@ module Twenty::GraphQL::Type field :name, String, null: false field :path, String, null: false field :color, String, null: false - field :tasks, '[Twenty::GraphQL::Type::Task]', null: false + field :tasks, "[Twenty::GraphQL::Type::Task]", null: false end end diff --git a/twenty-server/lib/twenty-server/graphql/type/query.rb b/twenty-server/lib/twenty-server/graphql/type/query.rb index fc9c5e8..0d501b8 100644 --- a/twenty-server/lib/twenty-server/graphql/type/query.rb +++ b/twenty-server/lib/twenty-server/graphql/type/query.rb @@ -11,7 +11,6 @@ module Twenty::GraphQL::Type end field :projects, [Project], null: false - def find_task(task_id:) Twenty::Task.with_pk!(task_id) end diff --git a/twenty-server/lib/twenty-server/graphql/type/task.rb b/twenty-server/lib/twenty-server/graphql/type/task.rb index 12dadef..3d1d6d0 100644 --- a/twenty-server/lib/twenty-server/graphql/type/task.rb +++ b/twenty-server/lib/twenty-server/graphql/type/task.rb @@ -4,9 +4,9 @@ module Twenty::GraphQL::Type class Task < GraphQL::Schema::Object field :id, Int, null: false field :title, String, null: false - field :status, 'Twenty::GraphQL::Type::TaskStatus', null: false + field :status, "Twenty::GraphQL::Type::TaskStatus", null: false field :content, String, null: false - field :project, 'Twenty::GraphQL::Type::Project', null: false + field :project, "Twenty::GraphQL::Type::Project", null: false field :updated_at, GraphQL::Types::ISO8601DateTime, null: false field :is_ready, Boolean, null: false, method: :ready? field :is_backlogged, Boolean, null: false, method: :backlog? diff --git a/twenty-server/lib/twenty-server/migration/1_create_projects.rb b/twenty-server/lib/twenty-server/migration/1_create_projects.rb index 7eb2cb7..78a2a25 100644 --- a/twenty-server/lib/twenty-server/migration/1_create_projects.rb +++ b/twenty-server/lib/twenty-server/migration/1_create_projects.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Sequel.migration do up do create_table(:projects) do diff --git a/twenty-server/lib/twenty-server/model/task.rb b/twenty-server/lib/twenty-server/model/task.rb index f82655e..e8748b8 100644 --- a/twenty-server/lib/twenty-server/model/task.rb +++ b/twenty-server/lib/twenty-server/model/task.rb @@ -4,7 +4,7 @@ class Twenty::Task < Sequel::Model include Twenty::Model plugin(:enum) - STATUS_MAP = {backlog: 0, ready: 1, in_progress: 2, complete: 3} + STATUS_MAP = {backlog: 0, ready: 1, in_progress: 2, complete: 3} STATUS_KEYS = STATUS_MAP.keys enum :status, STATUS_MAP diff --git a/twenty-server/lib/twenty-server/rack/graphql.rb b/twenty-server/lib/twenty-server/rack/graphql.rb index 2655aaf..e15f350 100644 --- a/twenty-server/lib/twenty-server/rack/graphql.rb +++ b/twenty-server/lib/twenty-server/rack/graphql.rb @@ -14,7 +14,7 @@ module Twenty::Rack def call(env) req = Rack::Request.new(env) if req.post? && - req.path == "/graphql" + req.path == "/graphql" params = JSON.parse(req.body.string) result = Twenty::GraphQL::Schema.execute( params["query"],