Commit Graph
260 Commits
Author SHA1 Message Date
Dmitriy Zaporozhets 40104746d6 Merge remote-tracking branch 'origin/feature/update-rubocop' 2015-12-16 13:44:50 +01:00
Douwe Maan 7781bda9bd Move Markdown/reference logic from Gitlab::Markdown to Banzai 2015-12-15 15:51:16 +01:00
Gabriel Mazetto b5291f9599 Fixed Rubocop offenses 2015-12-15 00:53:52 -02:00
Grzegorz Bizon 32d83ee79f Merge branch 'master' into ux/suppress-ci-yml-warning
* master: (24 commits)
  Fix runners admin view
  Fix migrations
  Run builds from projects with enabled CI
  Use Gitlab::Git instead of Ci::Git
  Fix last specs
  Fix specs
  Fix after column rename
  Fix errors
  Update badge
  Finishing touches
  Fix triggers tests
  Rename columns and rename migrations
  Reimplement Trigger API
  Remove ci_ prefix from all ci related things
  Add runners token
  Migrate CI::Project to Project
  Fix indentation and BuildsEmailService
  Change default values
  Enhance migrate CI emails
  Fix issue tracker service
  ...

Conflicts:
	spec/features/commits_spec.rb
2015-12-14 12:25:37 +01:00
Grzegorz Bizon 65fe4bb1ce Improve gitlab ci commits specs (refactoring)
This minimizes usage of instance variables in this spec, and changes
double quotation marks to single when string interpolation is not being
used.
2015-12-14 09:59:08 +01:00
Douwe Maan 50f8366a89 Merge branch 'complexity/rubocop-metrics' into 'master'
Enable rubocop metrics

This enables rubocop metrics like CyclomaticComplexity and ABCSize.
Initial threshold values are high, should be probably decreased.

See merge request !1802
2015-12-11 15:06:31 +00:00
Douwe Maan 51ed5225ad Merge branch 'serve_lfs_object' into 'master'
Serve LFS object

Depends on gitlab-org/gitlab_git!57

See merge request !1976
2015-12-08 14:19:52 +00:00
Marin Jankovski 9bf51ae47d Fix specs caused by update of gitlab-test repo. 2015-12-08 10:58:15 +01:00
Grzegorz Bizon 7e9109c43b Move common_mentionable_setup to shared context in specs 2015-12-08 08:43:09 +01:00
Douglas Barbosa Alexandre f7aafd8fc8 Merge branch 'master' into fix-merge-request-that-removes-submodule 2015-12-07 22:41:18 -02:00
Dmitriy Zaporozhets bdb4945dcf Fix random failing test - delete attachment
Make sure we wait for AJAX request to finish before end test and cleanup
database

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-12-07 23:40:17 +01:00
Douglas Barbosa Alexandre 7d836a0c0a Merge branch 'master' into fix-merge-request-that-removes-submodule 2015-12-07 13:09:01 -02:00
Marin Jankovski e53b350cb6 Add specs for showing lfs object in UI. 2015-12-07 15:03:50 +01:00
Douglas Barbosa Alexandre 12fdc13ad3 Fix 500 error when creating a merge request that removes a submodule 2015-12-04 17:35:14 -02:00
Douwe Maan f905fd239c Use URL helpers in specs 2015-12-03 14:00:09 +01:00
Douwe Maan c07f0fa735 Add new references to markdown feature spec. 2015-12-01 17:04:32 +01:00
Douwe Maan f3ea06eb7f Autolink first so we don't pick up numeric anchors as issue references. 2015-12-01 15:53:32 +01:00
Douwe Maan 4a0ebccf6b Fix specs 2015-11-30 22:43:54 +01:00
Robert Speicher d09d62b6b8 Replace all usages of git command with configurable binary path
Closes #3311
2015-11-03 17:11:09 -05:00
Douwe Maan 34148d1576 Merge branch 'master' into rs-redactor-filter 2015-10-16 11:26:48 +02:00
Dmitriy Zaporozhets 524b3db30c Merge branch 'fix-path-with-leading-dot-error' into 'master'
Fix error preventing displaying of commit data for a directory with a leading dot

Directories with leading dots erroneously get rejected by the route controller if git
ref regex is used in constraints. This prevents commit data from being loaded. The regex verification is now done in controller.

Closes https://github.com/gitlabhq/gitlabhq/issues/8763


See merge request !1574
2015-10-15 10:36:24 +00:00
Douwe Maan 95f0440a78 Merge branch 'master' into rs-redactor-filter 2015-10-15 11:26:58 +02:00
Robert Speicher 123669a551 Merge branch 'simplify-cross-references' into 'master'
Simplify code around (cross)-references

See merge request !1568
2015-10-14 20:10:34 +00:00
Douwe Maan 276b3a7bc2 Make Mentionable#cross_reference_exists? private. 2015-10-14 09:27:39 +02:00
Stan Hu d02d02c672 Fix error preventing displaying of commit data for a directory with a leading dot
Closes https://github.com/gitlabhq/gitlabhq/issues/8763
2015-10-12 22:24:19 -07:00
Douwe Maan 6f35614852 Fix mentionable specs 2015-10-12 16:23:15 +02:00
Alex Lossent 024e34e94d Hide passwords to non-admin users in the services API
In order to be consistent with !1490 doing it for the web interface
2015-10-12 15:24:00 +02:00
Douwe Maan b0164771ec Simplify code around (cross)-references 2015-10-12 11:54:46 +02:00
Douwe Maan 72afcbcd37 Always allow references to the current project 2015-10-07 19:19:23 +02:00
Douwe Maan f42cfa9e87 Refactor reference gathering to use a dedicated filter 2015-10-07 17:00:48 +02:00
Douwe Maan 4f629dab2a Merge branch 'master' into rs-redactor-filter 2015-10-07 15:15:35 +02:00
Kamil Trzciński 3eef0e18e0 Merge branch 'refactor-build-service' into 'master'
Refactor Ci::Commit and Ci::Build to have all builds for same :sha on single page

This makes Ci::Commit to have only :sha and simplifies routing to have only :sha in path. The :ref and :push_data is now parameter of Ci::Build.

All commit related data (git author, message and .gitlab-ci.yml) is read directly from repository.

All code related for creating builds is moved to CreateBuildsService.

Status deduction is rewritten to make if more efficient and easier to integrate with Commit Status API.

This is partially working, tests are not yet touched.

This slightly changes view of Commit:
![Screen_Shot_2015-10-02_at_15.21.47](https://gitlab.com/gitlab-org/gitlab-ce/uploads/ad3f1ccdcc87659ea437d8db6c5b9f94/Screen_Shot_2015-10-02_at_15.21.47.png)

@dzaporozhets What do you think?


See merge request !1502
2015-10-05 17:42:50 +00:00
Yorick Peterse 2fa4e2fb6a Evaluate benchmark blocks in the proper context
This ensures that blocks defines using "benchmark_subject" have access
to methods defined using let/subject & friends.
2015-10-05 16:27:41 +02:00
Kamil Trzcinski d2d2df0738 Fix next round of tests 2015-10-05 13:12:00 +02:00
Yorick Peterse 22506ddc50 Added benchmark_subject method for benchmarks
This class method can be used in "describe" blocks to specify the
subject of a benchmark. This lets you write:

    benchmark_subject { Foo }

instead of:

    benchmark_subject { -> { Foo } }
2015-10-05 10:51:24 +02:00
Yorick Peterse 19893a1c10 Basic setup for an RSpec based benchmark suite
This benchmark suite uses benchmark-ips
(https://github.com/evanphx/benchmark-ips) behind the scenes. Specs can
be turned into benchmark specs by setting "benchmark" to "true" in the
top-level describe block like so:

    describe SomeClass, benchmark: true do

    end

Writing benchmarks can be done using custom RSpec matchers, for example:

    describe MaruTheCat, benchmark: true do
      describe '#jump_in_box' do
        it 'should run 1000 iterations per second' do
          maru = described_class.new

          expect { maru.jump_in_box }.to iterate_per_second(1000)
        end
      end
    end

By default the "iterate_per_second" expectation requires a standard
deviation under 30% (this is just an arbitrary default for now). You can
change this by chaining "with_maximum_stddev" on the expectation:

    expect { maru.jump_in_box }.to iterate_per_second(1000)
      .with_maximum_stddev(10)

This will change the expectation to require a maximum deviation of 10%.

Alternatively you can use the it block style to write specs:

    describe MaruTheCat, benchmark: true do
      describe '#jump_in_box' do
        subject { -> { described_class.new } }

        it { is_expected.to iterate_per_second(1000) }
      end
    end

Because "iterate_per_second" operates on a block, opposed to a static
value, the "subject" method must return a Proc. This looks a bit goofy
but I have been unable to find a nice way around this.
2015-10-02 17:00:23 +02:00
Yorick Peterse dbc05d4a62 Don't use "rm" for cleaning tmp/builds
If this directory were to be empty this would result in warnings being
printed to STDERR, cluttering spec output. Doing this in Ruby fixes this
problem (and also removes the need for shell alltogether).
2015-10-02 16:25:47 +02:00
Douwe Maan ee028d9d60 Rename reply_by_email to incoming_email to prepare for the future. 2015-09-21 10:35:37 +02:00
Kamil Trzcinski 2f2b9f67c2 Fix backup tests 2015-09-16 00:06:41 +02:00
Kamil Trzcinski 8d5c9935ff Fix: models/ci/project_spec.rb 2015-09-15 22:00:17 +02:00
Valery Sizov b87ca7500f fix specs. Stage 7 2015-09-15 17:43:17 +03:00
Valery Sizov e2cbb36ba9 fix specs. Stage 5 2015-09-15 15:51:03 +03:00
Valery Sizov 910bf96ec3 fix specs. Stage 2 2015-09-14 18:14:17 +03:00
Valery Sizov 4c53cc0eba rubocop satisfy 2015-09-14 14:37:18 +03:00
Dmitriy Zaporozhets e3c30bf2e8 Merge branch 'master' into ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-g
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-09-11 16:32:11 +02:00
Dmitriy Zaporozhets 4e7b47dde1 Convert ci features specs to v3 2015-09-10 16:56:21 +02:00
Dmitriy Zaporozhets 9d93c567b3 Fix part of CI api tests 2015-09-10 16:04:06 +02:00
Dmitriy Zaporozhets 10b3c85e2c Fix some issues with ci models specs 2015-09-10 15:47:15 +02:00
Dmitriy Zaporozhets 0b5d627cd4 Merge branch 'master' into ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-g 2015-09-09 14:56:02 +02:00
Dmitriy Zaporozhets 76c6aeb9bc Merge CI factories and CI spec/support with GitLab 2015-09-09 13:37:50 +02:00